[RS4GC] Fix rematerialization of bitcast of bitcast.
[oota-llvm.git] / test / Transforms / JumpThreading / compare.ll
1 ; There should be no phi nodes left.
2 ; RUN: opt < %s -jump-threading  -S | not grep "phi i32"
3
4 declare i32 @f1()
5 declare i32 @f2()
6 declare void @f3()
7
8 define i32 @test(i1 %cond) {
9         br i1 %cond, label %T1, label %F1
10
11 T1:
12         %v1 = call i32 @f1()
13         br label %Merge
14
15 F1:
16         %v2 = call i32 @f2()
17         br label %Merge
18
19 Merge:
20         %B = phi i32 [%v1, %T1], [12, %F1]
21         %A = icmp ne i32 %B, 42
22         br i1 %A, label %T2, label %F2
23
24 T2:
25         call void @f3()
26         ret i32 1
27
28 F2:
29         ret i32 0
30 }