aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/Reassociate/fast-MissedTree.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/Reassociate/fast-MissedTree.ll')
-rw-r--r--test/Transforms/Reassociate/fast-MissedTree.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/Reassociate/fast-MissedTree.ll b/test/Transforms/Reassociate/fast-MissedTree.ll
new file mode 100644
index 0000000..689fd6c
--- /dev/null
+++ b/test/Transforms/Reassociate/fast-MissedTree.ll
@@ -0,0 +1,11 @@
+; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s
+
+define float @test1(float %A, float %B) {
+; CHECK-LABEL: test1
+; CHECK: %Z = fadd fast float %A, %B
+; CHECK: ret float %Z
+ %W = fadd fast float %B, -5.0
+ %Y = fadd fast float %A, 5.0
+ %Z = fadd fast float %W, %Y
+ ret float %Z
+}