aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/Reassociate/fp-expr.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/Reassociate/fp-expr.ll')
-rw-r--r--test/Transforms/Reassociate/fp-expr.ll33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/Transforms/Reassociate/fp-expr.ll b/test/Transforms/Reassociate/fp-expr.ll
new file mode 100644
index 000000000000..5af3b1991c9e
--- /dev/null
+++ b/test/Transforms/Reassociate/fp-expr.ll
@@ -0,0 +1,33 @@
+; 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
+}
+
+define half @test2() {
+; CHECK-LABEL: @test2
+; CHECK: fsub
+; CHECK: fsub
+; CHECK: fadd
+ %tmp15 = fsub fast half undef, undef
+ %tmp17 = fsub fast half undef, %tmp15
+ %tmp18 = fadd fast half undef, %tmp17
+ ret half %tmp18
+}
+
+
+
+; Function Attrs: optsize
+declare <4 x float> @blam()
+
+; Function Attrs: optsize
+declare void @wombat(<4 x float>)
+