Filter loops that subtract induction variables.
[oota-llvm.git] / test / Transforms / GVNPRE / 2007-07-04-SelectInst.ll
1 ; RUN: llvm-as < %s | opt -gvnpre | llvm-dis
2
3 define void @set_depth_values(i32 %level) {
4 cond_true90:            ; preds = %cond_next84
5         br i1 false, label %cond_true105, label %cond_true151
6
7 cond_true105:           ; preds = %cond_true90
8         %tmp132 = add i32 %level, -3            ; <i32> [#uses=2]
9         %tmp133 = icmp sgt i32 %tmp132, 0               ; <i1> [#uses=1]
10         %max134 = select i1 %tmp133, i32 %tmp132, i32 1         ; <i32> [#uses=0]
11         br label %cond_true151
12
13 cond_true151:           ; preds = %cond_true140, %cond_true105
14         %tmp153 = add i32 %level, -3            ; <i32> [#uses=2]
15         %tmp154 = icmp sgt i32 %tmp153, 0               ; <i1> [#uses=1]
16         %max155 = select i1 %tmp154, i32 %tmp153, i32 1         ; <i32> [#uses=0]
17         ret void
18 }