Fix a pair of issues that caused an infinite loop in reassociate.
[oota-llvm.git] / test / Transforms / Reassociate / fp-expr.ll
diff --git a/test/Transforms/Reassociate/fp-expr.ll b/test/Transforms/Reassociate/fp-expr.ll
new file mode 100644 (file)
index 0000000..ee92706
--- /dev/null
@@ -0,0 +1,20 @@
+; RUN: opt -S -reassociate < %s | FileCheck %s
+
+define void @test1() {
+; CHECK-LABEL: @test1
+; CHECK: call
+; CHECK: fsub
+; CHECK: fadd
+  %tmp = tail call <4 x float> @blam()
+  %tmp23 = fsub fast <4 x float> undef, %tmp
+  %tmp24 = fadd fast <4 x float> %tmp23, undef
+  tail call void @wombat(<4 x float> %tmp24)
+  ret void
+}
+
+; Function Attrs: optsize
+declare <4 x float> @blam()
+
+; Function Attrs: optsize
+declare void @wombat(<4 x float>)
+