Use the llvm-upgrade program to upgrade llvm assembly.
[oota-llvm.git] / test / Transforms / SimplifyCFG / PhiNoEliminate.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep select
2
3 ;; The PHI node in this example should not be turned into a select, as we are
4 ;; not able to ifcvt the entire block.  As such, converting to a select just 
5 ;; introduces inefficiency without saving copies.
6
7 int %bar(bool %C) {
8 entry:
9         br bool %C, label %then, label %endif
10
11 then:
12         %tmp.3 = call int %qux()
13         br label %endif
14
15 endif:
16         %R = phi int [123, %entry], [12312, %then]
17         ;; stuff to disable tail duplication
18         call int %qux()
19         call int %qux()
20         call int %qux()
21         call int %qux()
22         call int %qux()
23         call int %qux()
24         call int %qux()
25         ret int %R
26 }
27
28 declare int %qux()
29