summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-01-31 01:04:23 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-01-31 01:04:23 +0000
commit41e4ac4224337cc17c687687eff9dc1ae9ea2663 (patch)
tree9d08c92c6da27ac0e894c0b86bc89dd3bb694ad0 /llvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
parentb8b16b567c123339dd4fea01170a86daf215a229 (diff)
downloadbcm5719-llvm-41e4ac4224337cc17c687687eff9dc1ae9ea2663.tar.gz
bcm5719-llvm-41e4ac4224337cc17c687687eff9dc1ae9ea2663.zip
Filecheckized 2x tests in SimplifyCFG and removed their date prefix to fit with current llvm style for test names.
llvm-svn: 174011
Diffstat (limited to 'llvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll')
-rw-r--r--llvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll b/llvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
new file mode 100644
index 00000000000..aba08dc073a
--- /dev/null
+++ b/llvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
@@ -0,0 +1,21 @@
+; Basic block #2 should not be merged into BB #3!
+;
+; RUN: opt < %s -simplifycfg -S | FileCheck %s
+
+declare void @foo()
+
+define void @cprop_test12(i32* %data) {
+bb0:
+ %reg108 = load i32* %data ; <i32> [#uses=2]
+ %cond218 = icmp ne i32 %reg108, 5 ; <i1> [#uses=1]
+ br i1 %cond218, label %bb3, label %bb2
+bb2: ; preds = %bb0
+ call void @foo( )
+; CHECK: br label %bb3
+ br label %bb3
+bb3: ; preds = %bb2, %bb0
+ %reg117 = phi i32 [ 110, %bb2 ], [ %reg108, %bb0 ] ; <i32> [#uses=1]
+ store i32 %reg117, i32* %data
+ ret void
+}
+
OpenPOWER on IntegriCloud