blob: a9040123e309f6a411fddccab8637af4d6290667 [file] [log] [blame]
Reid Spencereb1d74e2007-04-16 17:36:08 +00001; RUN: llvm-upgrade < %s | llvm-as | \
2; RUN: opt -predsimplify -instcombine -simplifycfg | llvm-dis | \
3; RUN: grep -v declare | grep -c pass | grep 2
Nick Lewycky30b3b1c2006-10-26 02:33:51 +00004
5int %test(int %x, int %y) {
6entry:
7 %tmp2 = setlt int %x, %y
8 %tmp = setne bool %tmp2, true
9 br bool %tmp, label %cond_true, label %return
10
11cond_true: ; preds = %entry
12 %tmp4 = seteq int %x, %y ; <bool> [#uses=1]
13 br bool %tmp4, label %cond_true5, label %cond_false
14
15cond_true5: ; preds = %cond_true
16 %tmp6 = call int %pass1( ) ; <int> [#uses=1]
17 ret int %tmp6
18
19cond_false:
20 %tmp8 = call int %pass2( ) ; <int> [#uses=1]
21 ret int %tmp8
22
23return: ; preds = %cond_next7
24 ret int 0
25}
26
27declare int %pass1()
28declare int %pass2()