summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-27 01:05:19 +0000
committerChris Lattner <sabre@nondot.org>2003-08-27 01:05:19 +0000
commitfa982a538966d4cada2c470b5a02ddc2a92ca5ff (patch)
tree44de8aca188b0171ca603b81db1eceb6d26f7d67 /llvm/test
parent2b338325983d19681efad4fca5315b6439431df4 (diff)
downloadbcm5719-llvm-fa982a538966d4cada2c470b5a02ddc2a92ca5ff.tar.gz
bcm5719-llvm-fa982a538966d4cada2c470b5a02ddc2a92ca5ff.zip
New testcase
llvm-svn: 8151
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Regression/Transforms/SCCP/2003-08-26-InvokeHandling.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/SCCP/2003-08-26-InvokeHandling.ll b/llvm/test/Regression/Transforms/SCCP/2003-08-26-InvokeHandling.ll
new file mode 100644
index 00000000000..525f15201d3
--- /dev/null
+++ b/llvm/test/Regression/Transforms/SCCP/2003-08-26-InvokeHandling.ll
@@ -0,0 +1,15 @@
+; The PHI cannot be eliminated from this testcase, SCCP is mishandling invoke's!
+; RUN: as < %s | opt -sccp | dis | grep phi
+
+declare void %foo()
+int %test(bool %cond) {
+Entry:
+ br bool %cond, label %Inv, label %Cont
+Inv:
+ invoke void %foo() to label %Ok except label %Cont
+Ok:
+ br label %Cont
+Cont:
+ %X = phi int [0, %Entry], [1,%Ok], [0, %Inv]
+ ret int %X
+}
OpenPOWER on IntegriCloud