Handling of setlt/le/gt/ge is broken at the moment; predsimplify removes
[oota-llvm.git] / test / Transforms / PredicateSimplifier / 2006-10-25-AddSetCC.ll
1 ; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg -disable-output &&
2 ; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | grep -c pass | grep 2
3
4 int %test(int %x, int %y) {
5 entry:
6         %tmp2 = setlt int %x, %y
7         %tmp = setne bool %tmp2, true
8         br bool %tmp, label %cond_true, label %return
9
10 cond_true:              ; preds = %entry
11         %tmp4 = seteq int %x, %y                ; <bool> [#uses=1]
12         br bool %tmp4, label %cond_true5, label %cond_false
13
14 cond_true5:             ; preds = %cond_true
15         %tmp6 = call int %pass1( )              ; <int> [#uses=1]
16         ret int %tmp6
17
18 cond_false:
19         %tmp8 = call int %pass2( )              ; <int> [#uses=1]
20         ret int %tmp8
21
22 return:         ; preds = %cond_next7
23         ret int 0
24 }
25
26 declare int %pass1()
27 declare int %pass2()