llvm.org GIT mirror llvm / f065f05
add a testcase nate requested git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22663 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 14 years ago
1 changed file(s) with 33 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | opt -condprop | llvm-dis | not grep phi
1
2 int %test(uint %C, bool %Val) {
3 switch uint %C, label %T1 [
4 uint 4, label %T2
5 uint 17, label %T3
6 ]
7 T1:
8 call void %a()
9 br label %Cont
10 T2:
11 call void %b()
12 br label %Cont
13 T3:
14 call void %c()
15 br label %Cont
16
17 Cont:
18 ;; PHI becomes dead after threading T2
19 %C2 = phi bool [%Val, %T1], [true, %T2], [%Val, %T3]
20 br bool %C2, label %L2, label %F2
21 L2:
22 call void %d()
23 ret int 17
24 F2:
25 call void %e()
26 ret int 1
27 }
28 declare void %a()
29 declare void %b()
30 declare void %c()
31 declare void %d()
32 declare void %e()