blob: 503d327cac591e288f4bc9b6da347ae125779a10 [file] [log] [blame]
Nick Lewycky30b3b1c2006-10-26 02:33:51 +00001; 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
4int %test(int %x, int %y) {
5entry:
6 %tmp2 = setlt int %x, %y
7 %tmp = setne bool %tmp2, true
8 br bool %tmp, label %cond_true, label %return
9
10cond_true: ; preds = %entry
11 %tmp4 = seteq int %x, %y ; <bool> [#uses=1]
12 br bool %tmp4, label %cond_true5, label %cond_false
13
14cond_true5: ; preds = %cond_true
15 %tmp6 = call int %pass1( ) ; <int> [#uses=1]
16 ret int %tmp6
17
18cond_false:
19 %tmp8 = call int %pass2( ) ; <int> [#uses=1]
20 ret int %tmp8
21
22return: ; preds = %cond_next7
23 ret int 0
24}
25
26declare int %pass1()
27declare int %pass2()