llvm.org GIT mirror llvm / b9a9057
Temporarily reverting 46959. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47542 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 12 years ago
2 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
19181918
19191919 // At this point, we would like to compute how many iterations of the
19201920 // loop the predicate will return true for these inputs.
1921 if (LHS->isLoopInvariant(L) && !RHS->isLoopInvariant(L)) {
1922 // If there is a loop-invariant, force it into the RHS.
1921 if (isa(LHS) && !isa(RHS)) {
1922 // If there is a constant, force it into the RHS.
19231923 std::swap(LHS, RHS);
19241924 Cond = ICmpInst::getSwappedPredicate(Cond);
19251925 }
0 ; RUN: llvm-as < %s | opt -scalar-evolution -analyze | grep {Loop header: ( 0 smax %n) iterations!}
1 ; XFAIL: *
12
23 define void @foo(i32 %n) {
34 entry: