[llvm] [AArch64][SelectionDAG] Lower multiplication by a constant to shl+add+shl+add (PR #89532)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 23 20:53:36 PDT 2024
================
@@ -510,6 +527,24 @@ define i32 @test25_fast_shift(i32 %x) "target-features"="+alu-lsl-fast" {
ret i32 %mul
}
+; Negative: 35 = (((1<<4) + 1) << 1) + 1, the shift number 4 is out of bound
----------------
efriedma-quic wrote:
Not that it's really relevant for this specific case given my other comment, but you can decompose this to `x*7*5`.
https://github.com/llvm/llvm-project/pull/89532
More information about the llvm-commits
mailing list