summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstSimplify/dead-code-removal.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/InstSimplify/dead-code-removal.ll')
-rw-r--r--llvm/test/Transforms/InstSimplify/dead-code-removal.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstSimplify/dead-code-removal.ll b/llvm/test/Transforms/InstSimplify/dead-code-removal.ll
new file mode 100644
index 00000000000..e181f3b60d5
--- /dev/null
+++ b/llvm/test/Transforms/InstSimplify/dead-code-removal.ll
@@ -0,0 +1,15 @@
+; RUN: opt -instsimplify -S < %s | FileCheck %s
+
+define void @foo() nounwind {
+ br i1 undef, label %1, label %4
+
+; <label>:1 ; preds = %1, %0
+; CHECK-NOT: phi
+; CHECK-NOT: sub
+ %2 = phi i32 [ %3, %1 ], [ undef, %0 ]
+ %3 = sub i32 0, undef
+ br label %1
+
+; <label>:4 ; preds = %0
+ ret void
+}
OpenPOWER on IntegriCloud