summaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyCFG/PHINode.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
commit67dad63de642cb4d94928eae5d3568268e3398bd (patch)
tree41704eedeb922074d2417186a450b6657900f184 /test/Transforms/SimplifyCFG/PHINode.ll
parentc6077eff8b9963b59de21e5d1dfae7a6ea75da36 (diff)
downloadexternal_llvm-67dad63de642cb4d94928eae5d3568268e3398bd.zip
external_llvm-67dad63de642cb4d94928eae5d3568268e3398bd.tar.gz
external_llvm-67dad63de642cb4d94928eae5d3568268e3398bd.tar.bz2
Filecheckized 2x tests in SimplifyCFG and removed their date prefix to fit with current llvm style for test names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyCFG/PHINode.ll')
-rw-r--r--test/Transforms/SimplifyCFG/PHINode.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/PHINode.ll b/test/Transforms/SimplifyCFG/PHINode.ll
new file mode 100644
index 0000000..25a242a
--- /dev/null
+++ b/test/Transforms/SimplifyCFG/PHINode.ll
@@ -0,0 +1,15 @@
+; -simplifycfg is not folding blocks if there is a PHI node involved. This
+; should be fixed eventually
+
+; RUN: opt < %s -simplifycfg -S | FileCheck %s
+
+define i32 @main(i32 %argc) {
+; <label>:0
+; CHECK-NOT: br label %InlinedFunctionReturnNode
+ br label %InlinedFunctionReturnNode
+InlinedFunctionReturnNode: ; preds = %0
+ %X = phi i32 [ 7, %0 ] ; <i32> [#uses=1]
+ %Y = add i32 %X, %argc ; <i32> [#uses=1]
+ ret i32 %Y
+}
+