aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Transforms/ADCE/2002-05-22-PHITest.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/ADCE/2002-05-22-PHITest.ll b/test/Transforms/ADCE/2002-05-22-PHITest.ll
new file mode 100644
index 0000000000..79bcd814f3
--- /dev/null
+++ b/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: as < %s | opt -adce | 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
+}