diff options
| author | Chad Rosier <mcrosier@codeaurora.org> | 2014-11-17 15:52:51 +0000 |
|---|---|---|
| committer | Chad Rosier <mcrosier@codeaurora.org> | 2014-11-17 15:52:51 +0000 |
| commit | 9a1ac6e494bfbe8daee4302404a15eda4fbbfa05 (patch) | |
| tree | 95dde6543fbdccebb3991c7e80a92fc3039d7239 /llvm/test/Transforms/Reassociate | |
| parent | 3687d3c2e9e1d4dcfb76e7d7614413eede5af951 (diff) | |
| download | bcm5719-llvm-9a1ac6e494bfbe8daee4302404a15eda4fbbfa05.tar.gz bcm5719-llvm-9a1ac6e494bfbe8daee4302404a15eda4fbbfa05.zip | |
[Reassociate] Canonicalize constants to RHS operand.
Fix a thinko where the RHS was already a constant.
llvm-svn: 222139
Diffstat (limited to 'llvm/test/Transforms/Reassociate')
3 files changed, 6 insertions, 6 deletions
diff --git a/llvm/test/Transforms/Reassociate/canonicalize-neg-const.ll b/llvm/test/Transforms/Reassociate/canonicalize-neg-const.ll index 8952675a8cf..e85a963f6dd 100644 --- a/llvm/test/Transforms/Reassociate/canonicalize-neg-const.ll +++ b/llvm/test/Transforms/Reassociate/canonicalize-neg-const.ll @@ -20,7 +20,7 @@ define double @test1(double %x, double %y) { ; (x + -0.1234 * y) * (x + -0.1234 * y) -> (x - 0.1234 * y) * (x - 0.1234 * y) define double @test2(double %x, double %y) { ; CHECK-LABEL: @test2 -; CHECK-NEXT: fmul double 1.234000e-01, %y +; CHECK-NEXT: fmul double %y, 1.234000e-01 ; CHECK-NEXT: fsub double %x, %mul ; CHECK-NEXT: fmul double %add{{.*}}, %add{{.*}} ; CHECK-NEXT: ret double %mul @@ -36,7 +36,7 @@ define double @test2(double %x, double %y) { ; (x + 0.1234 * y) * (x - -0.1234 * y) -> (x + 0.1234 * y) * (x + 0.1234 * y) define double @test3(double %x, double %y) { ; CHECK-LABEL: @test3 -; CHECK-NEXT: fmul double 1.234000e-01, %y +; CHECK-NEXT: fmul double %y, 1.234000e-01 ; CHECK-NEXT: fadd double %x, %mul ; CHECK-NEXT: fmul double %add{{.*}}, %add{{.*}} ; CHECK-NEXT: ret double @@ -100,7 +100,7 @@ define double @test7(double %x, double %y) { ; Canonicalize (y * -0.1234 + x) -> (x - 0.1234 * y) define double @test8(double %x, double %y) { ; CHECK-LABEL: @test8 -; 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-AgressiveSubMove.ll b/llvm/test/Transforms/Reassociate/fast-AgressiveSubMove.ll index 3b74fb6a30c..0c28ed16491 100644 --- a/llvm/test/Transforms/Reassociate/fast-AgressiveSubMove.ll +++ b/llvm/test/Transforms/Reassociate/fast-AgressiveSubMove.ll @@ -2,8 +2,8 @@ define float @test1(float %A) { ; CHECK-LABEL: test1 -; CHECK-NEXT: %X = fadd float 1.000000e+00, %A -; CHECK-NEXT: %Y = fadd float 1.000000e+00, %A +; CHECK-NEXT: %X = fadd float %A, 1.000000e+00 +; CHECK-NEXT: %Y = fadd float %A, 1.000000e+00 ; CHECK-NEXT: %r = fsub float %X, %Y ; CHECK-NEXT: ret float %r diff --git a/llvm/test/Transforms/Reassociate/fast-fp-commute.ll b/llvm/test/Transforms/Reassociate/fast-fp-commute.ll index 71fe7bb48a0..ad89607a21e 100644 --- a/llvm/test/Transforms/Reassociate/fast-fp-commute.ll +++ b/llvm/test/Transforms/Reassociate/fast-fp-commute.ll @@ -33,7 +33,7 @@ define float @test2(float %x, float %y) { define float @test3(float %x, float %y) { ; CHECK-LABEL: test3 -; CHECK-NEXT: %factor = fmul fast float 2.000000e+00, %y +; CHECK-NEXT: %factor = fmul fast float %y, 2.000000e+00 ; CHECK-NEXT: %tmp1 = fmul fast float %factor, %x ; CHECK-NEXT: ret float %tmp1 |

