blob: 4c83fa38a5540c89b91a13f3ff72c73244229bb6 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -condprop | llvm-dis | not grep phi
2
3declare bool %foo()
4
5int %test(uint %C) {
6 %Val = call bool %foo()
7 switch uint %C, label %T1 [
8 uint 4, label %T2
9 uint 17, label %T3
10 ]
11T1:
12 call void %a()
13 br label %Cont
14T2:
15 call void %b()
16 br label %Cont
17T3:
18 call void %c()
19 br label %Cont
20
21Cont:
22 ;; PHI becomes dead after threading T2
23 %C2 = phi bool [%Val, %T1], [true, %T2], [%Val, %T3]
24 br bool %C2, label %L2, label %F2
25L2:
26 call void %d()
27 ret int 17
28F2:
29 call void %e()
30 ret int 1
31}
32declare void %a()
33declare void %b()
34declare void %c()
35declare void %d()
36declare void %e()