summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-18 23:54:45 +0000
committerChris Lattner <sabre@nondot.org>2003-10-18 23:54:45 +0000
commit547eaefb0e56e197a1694c47f2e955a0df4d6c68 (patch)
tree321f2a1fc7882ecac7e9acc2e8674bbb09cbc889 /test
parent365f09a0e11c2e2053a8c5f0ade7d78a54f70b37 (diff)
downloadllvm-547eaefb0e56e197a1694c47f2e955a0df4d6c68.tar.gz
llvm-547eaefb0e56e197a1694c47f2e955a0df4d6c68.tar.bz2
llvm-547eaefb0e56e197a1694c47f2e955a0df4d6c68.tar.xz
New testcase, distilled from 176.gcc codegen failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll b/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
new file mode 100644
index 0000000000..e488ea835b
--- /dev/null
+++ b/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
@@ -0,0 +1,29 @@
+; RUN: llvm-as < %s | lli -force-interpreter=false
+
+%A = global int 0
+
+int %main() {
+ %Ret = call int %test(bool true, int 0)
+ ret int %Ret
+}
+
+int %test(bool %c, int %A) {
+ br bool %c, label %Taken1, label %NotTaken
+
+Cont:
+ %V = phi int [0, %NotTaken],
+ [ sub (int cast (int* %A to int), int 1234), %Taken1]
+ ret int 0
+
+NotTaken:
+ br label %Cont
+
+Taken1:
+ %B = seteq int %A, 0
+ ; Code got inserted here, breaking the condition code.
+ br bool %B, label %Cont, label %ExitError
+
+ExitError:
+ ret int 12
+
+}