summaryrefslogtreecommitdiff
path: root/test/Transforms/LICM
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-12-11 22:15:11 +0000
committerChris Lattner <sabre@nondot.org>2003-12-11 22:15:11 +0000
commit0ac4d9247b8b9732b2d49cdf31c5327ec37a44ec (patch)
tree4be45312998a2e85e44190951433a670950fe56e /test/Transforms/LICM
parent1ca2a583cb234cc8b26710e0f2ff68da2b6d24cd (diff)
downloadllvm-0ac4d9247b8b9732b2d49cdf31c5327ec37a44ec.tar.gz
llvm-0ac4d9247b8b9732b2d49cdf31c5327ec37a44ec.tar.bz2
llvm-0ac4d9247b8b9732b2d49cdf31c5327ec37a44ec.tar.xz
New testcase that LICM is breaking crafty on
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/LICM')
-rw-r--r--test/Transforms/LICM/2003-12-11-SinkingToPHI.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Transforms/LICM/2003-12-11-SinkingToPHI.ll b/test/Transforms/LICM/2003-12-11-SinkingToPHI.ll
new file mode 100644
index 0000000000..ecbc130e87
--- /dev/null
+++ b/test/Transforms/LICM/2003-12-11-SinkingToPHI.ll
@@ -0,0 +1,20 @@
+; RUN: llvm-as < %s | opt -licm | lli
+
+implementation ; Functions:
+
+int %main() {
+entry:
+ br label %Loop
+
+Loop:
+ br bool true, label %LoopCont, label %Out
+LoopCont:
+ %X = add int 1, 0
+ br bool true, label %Out, label %Loop
+
+Out:
+ %V = phi int [ 2, %Loop], [ %X, %LoopCont]
+ %V2 = sub int %V, 1
+ ret int %V2
+}
+