diff options
| author | Chad Rosier <mcrosier@codeaurora.org> | 2015-03-03 17:31:01 +0000 |
|---|---|---|
| committer | Chad Rosier <mcrosier@codeaurora.org> | 2015-03-03 17:31:01 +0000 |
| commit | 8e38f30e49f323a78c27083004c8651525e1bbfd (patch) | |
| tree | 217141eeec1e28965f2202a472aacf28270e3cc0 /llvm/test/CodeGen | |
| parent | e292262e59217e21becdd762aa28967ea157d2f8 (diff) | |
| download | bcm5719-llvm-8e38f30e49f323a78c27083004c8651525e1bbfd.tar.gz bcm5719-llvm-8e38f30e49f323a78c27083004c8651525e1bbfd.zip | |
[AArch64] When combining constant mul of -3, prefer (sub x, (shl x, N)).
This change only effects codegen when the constant is -3.
llvm-svn: 231085
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/mul_pow2.ll | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/AArch64/mul_pow2.ll b/llvm/test/CodeGen/AArch64/mul_pow2.ll index efc0ec8c40e..b828223ef1c 100644 --- a/llvm/test/CodeGen/AArch64/mul_pow2.ll +++ b/llvm/test/CodeGen/AArch64/mul_pow2.ll @@ -74,8 +74,7 @@ define i32 @ntest2(i32 %x) { define i32 @ntest3(i32 %x) { ; CHECK-LABEL: ntest3 -; CHECK: add {{w[0-9]+}}, w0, w0, lsl #1 -; CHECK: neg w0, {{w[0-9]+}} +; CHECK: sub w0, w0, w0, lsl #2 %mul = mul nsw i32 %x, -3 ret i32 %mul |

