From f6e098c5863ae1055ea5702b01c524d182881204 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 18 Oct 2003 23:54:45 +0000 Subject: [PATCH] New testcase, distilled from 176.gcc codegen failure llvm-svn: 9248 --- ...-10-18-PHINode-ConstantExpr-CondCode-Failure.ll | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 llvm/test/Regression/Jello/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll diff --git a/llvm/test/Regression/Jello/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll b/llvm/test/Regression/Jello/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll new file mode 100644 index 0000000..e488ea8 --- /dev/null +++ b/llvm/test/Regression/Jello/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 + +} -- 2.7.4