summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/ADCE/2002-05-22-PHITest.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/ADCE/2002-05-22-PHITest.ll')
-rw-r--r--llvm/test/Transforms/ADCE/2002-05-22-PHITest.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Transforms/ADCE/2002-05-22-PHITest.ll b/llvm/test/Transforms/ADCE/2002-05-22-PHITest.ll
new file mode 100644
index 00000000000..cf9872e2e11
--- /dev/null
+++ b/llvm/test/Transforms/ADCE/2002-05-22-PHITest.ll
@@ -0,0 +1,13 @@
+; It is illegal to remove BB1 because it will mess up the PHI node!
+;
+; RUN: llvm-upgrade < %s | llvm-as | opt -adce | llvm-dis | grep BB1
+
+
+int "test"(bool %C, int %A, int %B) {
+ br bool %C, label %BB1, label %BB2
+BB1:
+ br label %BB2
+BB2:
+ %R = phi int [%A, %0], [%B, %BB1]
+ ret int %R
+}
OpenPOWER on IntegriCloud