summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/Reassociate
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2014-11-14 17:05:59 +0000
committerChad Rosier <mcrosier@codeaurora.org>2014-11-14 17:05:59 +0000
commitf8b55f1bc5aa5278716a77bcd02915e0d1e757ab (patch)
tree19f9b35dcb7805e471d6805d3a50375dae1f3509 /llvm/test/Transforms/Reassociate
parent477e42a6fb199f61c6299851064ef18f15b86815 (diff)
downloadbcm5719-llvm-f8b55f1bc5aa5278716a77bcd02915e0d1e757ab.tar.gz
bcm5719-llvm-f8b55f1bc5aa5278716a77bcd02915e0d1e757ab.zip
[Reassociate] Canonicalize constants to RHS operand.
llvm-svn: 222005
Diffstat (limited to 'llvm/test/Transforms/Reassociate')
-rw-r--r--llvm/test/Transforms/Reassociate/2006-04-27-ReassociateVector.ll2
-rw-r--r--llvm/test/Transforms/Reassociate/canonicalize-neg-const.ll8
-rw-r--r--llvm/test/Transforms/Reassociate/fast-ReassociateVector.ll4
3 files changed, 7 insertions, 7 deletions
diff --git a/llvm/test/Transforms/Reassociate/2006-04-27-ReassociateVector.ll b/llvm/test/Transforms/Reassociate/2006-04-27-ReassociateVector.ll
index f7839554002..ea869842b18 100644
--- a/llvm/test/Transforms/Reassociate/2006-04-27-ReassociateVector.ll
+++ b/llvm/test/Transforms/Reassociate/2006-04-27-ReassociateVector.ll
@@ -3,7 +3,7 @@
define <4 x float> @test1() {
; CHECK-LABEL: test1
; CHECK-NEXT: %tmp1 = fsub <4 x float> zeroinitializer, zeroinitializer
-; CHECK-NEXT: %tmp2 = fmul <4 x float> zeroinitializer, %tmp1
+; CHECK-NEXT: %tmp2 = fmul <4 x float> %tmp1, zeroinitializer
; CHECK-NEXT: ret <4 x float> %tmp2
%tmp1 = fsub <4 x float> zeroinitializer, zeroinitializer
diff --git a/llvm/test/Transforms/Reassociate/canonicalize-neg-const.ll b/llvm/test/Transforms/Reassociate/canonicalize-neg-const.ll
index 80f433a498d..8952675a8cf 100644
--- a/llvm/test/Transforms/Reassociate/canonicalize-neg-const.ll
+++ b/llvm/test/Transforms/Reassociate/canonicalize-neg-const.ll
@@ -3,7 +3,7 @@
; (x + 0.1234 * y) * (x + -0.1234 * y) -> (x + 0.1234 * y) * (x - 0.1234 * y)
define double @test1(double %x, double %y) {
; CHECK-LABEL: @test1
-; CHECK-NEXT: fmul double 1.234000e-01, %y
+; CHECK-NEXT: fmul double %y, 1.234000e-01
; CHECK-NEXT: fadd double %x, %mul
; CHECK-NEXT: fsub double %x, %mul
; CHECK-NEXT: fmul double %add{{.*}}, %add{{.*}}
@@ -64,7 +64,7 @@ define i64 @test4(i64 %x, i64 %y) {
; Canonicalize (x - -0.1234 * y)
define double @test5(double %x, double %y) {
; CHECK-LABEL: @test5
-; CHECK-NEXT: fmul double 1.234000e-01, %y
+; CHECK-NEXT: fmul double %y, 1.234000e-01
; CHECK-NEXT: fadd double %x, %mul
; CHECK-NEXT: ret double
@@ -76,7 +76,7 @@ define double @test5(double %x, double %y) {
; Don't modify (-0.1234 * y - x)
define double @test6(double %x, double %y) {
; CHECK-LABEL: @test6
-; CHECK-NEXT: fmul double -1.234000e-01, %y
+; CHECK-NEXT: fmul double %y, -1.234000e-01
; CHECK-NEXT: fsub double %mul, %x
; CHECK-NEXT: ret double %sub
@@ -88,7 +88,7 @@ define double @test6(double %x, double %y) {
; Canonicalize (-0.1234 * y + x) -> (x - 0.1234 * y)
define double @test7(double %x, double %y) {
; CHECK-LABEL: @test7
-; CHECK-NEXT: fmul double 1.234000e-01, %y
+; CHECK-NEXT: fmul double %y, 1.234000e-01
; CHECK-NEXT: fsub double %x, %mul
; CHECK-NEXT: ret double %add
diff --git a/llvm/test/Transforms/Reassociate/fast-ReassociateVector.ll b/llvm/test/Transforms/Reassociate/fast-ReassociateVector.ll
index e4b5e936f58..ab38edae0c4 100644
--- a/llvm/test/Transforms/Reassociate/fast-ReassociateVector.ll
+++ b/llvm/test/Transforms/Reassociate/fast-ReassociateVector.ll
@@ -1,10 +1,10 @@
; RUN: opt < %s -reassociate -S | FileCheck %s
-; Don't handle floating point vector operations.
+; Canonicalize operands, but don't optimize floating point vector operations.
define <4 x float> @test1() {
; CHECK-LABEL: test1
; CHECK-NEXT: %tmp1 = fsub fast <4 x float> zeroinitializer, zeroinitializer
-; CHECK-NEXT: %tmp2 = fmul fast <4 x float> zeroinitializer, %tmp1
+; CHECK-NEXT: %tmp2 = fmul fast <4 x float> %tmp1, zeroinitializer
%tmp1 = fsub fast <4 x float> zeroinitializer, zeroinitializer
%tmp2 = fmul fast <4 x float> zeroinitializer, %tmp1
OpenPOWER on IntegriCloud