While working on the pool allocator, I noticed that basicaa is failing a scary
[oota-llvm.git] / test / ExecutionEngine / 2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
1 ; RUN: llvm-as < %s | lli -force-interpreter=false
2
3 %A = global int 0
4
5 int %main() {
6         %Ret = call int %test(bool true, int 0) 
7         ret int %Ret
8 }
9
10 int %test(bool %c, int %A) {
11         br bool %c, label %Taken1, label %NotTaken
12
13 Cont:
14         %V = phi int [0, %NotTaken], 
15                       [ sub (int cast (int* %A to int), int 1234), %Taken1]
16         ret int 0
17
18 NotTaken:
19         br label %Cont  
20
21 Taken1:
22         %B = seteq int %A, 0
23         ; Code got inserted here, breaking the condition code.
24         br bool %B, label %Cont, label %ExitError
25
26 ExitError:
27         ret int 12
28
29 }