aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-10 16:38:36 +0000
committerChris Lattner <sabre@nondot.org>2009-04-10 16:38:36 +0000
commitd990f57a4171a26b5c1b4e3b63581fe54fa11ad7 (patch)
treebfd39852fe00a67b06c4b7945a1c68953a23b7aa /test
parentb646b51e9fb0d5faf8f3705cc1d0eab54afb782f (diff)
downloadexternal_llvm-d990f57a4171a26b5c1b4e3b63581fe54fa11ad7.zip
external_llvm-d990f57a4171a26b5c1b4e3b63581fe54fa11ad7.tar.gz
external_llvm-d990f57a4171a26b5c1b4e3b63581fe54fa11ad7.tar.bz2
fix two problems with machine sinking:
1. Sinking would crash when the first instruction of a block was sunk due to iterator problems. 2. Instructions could be sunk to their current block, causing an infinite loop. This fixes PR3968 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68787 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/Generic/2009-04-10-SinkCrash.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/2009-04-10-SinkCrash.ll b/test/CodeGen/Generic/2009-04-10-SinkCrash.ll
new file mode 100644
index 0000000..3637a06
--- /dev/null
+++ b/test/CodeGen/Generic/2009-04-10-SinkCrash.ll
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s | llc
+
+define void @QRiterate(i32 %p.1, double %tmp.212) nounwind {
+entry:
+ br i1 false, label %shortcirc_next.1, label %exit.1.critedge
+
+shortcirc_next.1: ; preds = %shortcirc_next.1, %entry
+ %tmp.213 = fcmp une double %tmp.212, 0.000000e+00 ; <i1> [#uses=1]
+ br i1 %tmp.213, label %shortcirc_next.1, label %exit.1
+
+exit.1.critedge: ; preds = %entry
+ ret void
+
+exit.1: ; preds = %shortcirc_next.1
+ ret void
+}