blob: 16785971e3ccfd678b663d9c06942e5da555b168 [file] [log] [blame]
Evan Cheng62366a72009-04-14 23:40:03 +00001; RUN: llvm-as < %s | opt -condprop | llvm-dis | not grep phi
2
3define i32 @foo(i1, i32, i32) {
4prologue:
5 br i1 %0, label %eq, label %ne
6
7eq: ; preds = %prologue
8 store i32 0, i32* inttoptr (i32 10000 to i32*)
9 %3 = icmp eq i32 %1, %2 ; <i1> [#uses=1]
10 br label %join
11
12ne: ; preds = %prologue
13 %4 = icmp ne i32 %1, %2 ; <i1> [#uses=1]
14 br label %join
15
16join: ; preds = %ne, %eq
17 %5 = phi i1 [ %3, %eq ], [ %4, %ne ] ; <i1> [#uses=1]
18 br i1 %5, label %yes, label %no
19
20yes: ; preds = %join
21 store i32 0, i32* inttoptr (i32 20000 to i32*)
22 ret i32 5
23
24no: ; preds = %join
25 ret i32 20
26}