Teach IndVarSimplify to optimize code using the C "int" type for
[oota-llvm.git] / test / Transforms / LoopUnroll / partial.ll
1 ; RUN: llvm-as < %s | opt -debug -loop-unroll |& grep {will not try to unroll partially because}
2 ; RUN: llvm-as < %s | opt -debug -loop-unroll -unroll-allow-partial |& grep {partially unrolling with count}
3 ; RUN: llvm-as < %s | opt -debug -loop-unroll -unroll-allow-partial -unroll-threshold=3 |& grep {could not unroll partially}
4
5 define i32 @main() {
6 entry:
7         br label %no_exit
8 no_exit:                ; preds = %no_exit, %entry
9         %indvar = phi i32 [ 0, %entry ], [ %indvar.next, %no_exit ]             ; <i32> [#uses=1]
10         %indvar.next = add i32 %indvar, 1               ; <i32> [#uses=2]
11         %exitcond = icmp ne i32 %indvar.next, 100       ; <i1> [#uses=1]
12         br i1 %exitcond, label %no_exit, label %loopexit
13 loopexit:               ; preds = %no_exit
14         ret i32 0
15 }