summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/IndVarSimplify/crash.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-03 05:54:59 +0000
committerChris Lattner <sabre@nondot.org>2010-04-03 05:54:59 +0000
commitc558b49f1411168eefee7eec1501bceb9ea2c8af (patch)
tree83823a7ee788f574611a50a5737a59e8ff298bc9 /llvm/test/Transforms/IndVarSimplify/crash.ll
parent2e23e5284c877e1c08f197b1eef163c4fe04d9c0 (diff)
downloadbcm5719-llvm-c558b49f1411168eefee7eec1501bceb9ea2c8af.tar.gz
bcm5719-llvm-c558b49f1411168eefee7eec1501bceb9ea2c8af.zip
first half of a pass through IndVarSimplify::HandleFloatingPointIV,
this cleans up a bunch of code and also fixes several crashes and miscompiles. More to come unfortunately, this optimization is quite broken. llvm-svn: 100270
Diffstat (limited to 'llvm/test/Transforms/IndVarSimplify/crash.ll')
-rw-r--r--llvm/test/Transforms/IndVarSimplify/crash.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/Transforms/IndVarSimplify/crash.ll b/llvm/test/Transforms/IndVarSimplify/crash.ll
new file mode 100644
index 00000000000..14f79fefb18
--- /dev/null
+++ b/llvm/test/Transforms/IndVarSimplify/crash.ll
@@ -0,0 +1,19 @@
+; RUN: opt -indvars %s -disable-output
+
+declare i32 @putchar(i8) nounwind
+
+define void @t2(i1* %P) nounwind {
+; <label>:0
+ br label %1
+
+; <label>:1 ; preds = %1, %0
+ %2 = phi double [ 9.000000e+00, %0 ], [ %4, %1 ] ; <double> [#uses=1]
+ %3 = tail call i32 @putchar(i8 72) ; <i32> [#uses=0]
+ %4 = fadd double %2, -1.000000e+00 ; <double> [#uses=2]
+ %5 = fcmp ult double %4, 0.000000e+00 ; <i1> [#uses=1]
+ store i1 %5, i1* %P
+ br i1 %5, label %6, label %1
+
+; <label>:6 ; preds = %1
+ ret void
+} \ No newline at end of file
OpenPOWER on IntegriCloud