Fix tests.
[oota-llvm.git] / test / ExecutionEngine / 2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
1 ; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
2 ; RUN: lli %t.bc > /dev/null
3
4 %A = global int 0
5
6 int %main() {
7         %Ret = call int %test(bool true, int 0) 
8         ret int %Ret
9 }
10
11 int %test(bool %c, int %A) {
12         br bool %c, label %Taken1, label %NotTaken
13
14 Cont:
15         %V = phi int [0, %NotTaken], 
16                       [ sub (int cast (int* %A to int), int 1234), %Taken1]
17         ret int 0
18
19 NotTaken:
20         br label %Cont  
21
22 Taken1:
23         %B = seteq int %A, 0
24         ; Code got inserted here, breaking the condition code.
25         br bool %B, label %Cont, label %ExitError
26
27 ExitError:
28         ret int 12
29
30 }