[PATCH] D132322: [AArch64][SelectionDAG] Optimize multiplication by constant

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 01:52:00 PDT 2022


Allen planned changes to this revision.
Allen marked an inline comment as done.
Allen added a comment.

Thanks for your information, and it seems not a easy work :)



================
Comment at: llvm/test/CodeGen/AArch64/mul_pow2.ll:183
 
+; TODO: mov w8, w0 + lsl x8, x8, #2 should combine into lsl x8, x0, #2
 define i64 @test6_umaddl(i32 %x, i64 %y) {
----------------
efriedma wrote:
> I think the suggestion misses a zero-extension.  Should be able to ubfiz, though.
Yes, this has been addressed with D132325, thanks.


================
Comment at: llvm/test/CodeGen/AArch64/sve-intrinsics-counting-elems-i32.ll:169
+; CHECK-NEXT:    dech x8, vl16, mul #8
+; CHECK-NEXT:    add w0, w0, w8
 ; CHECK-NEXT:    ret
----------------
efriedma wrote:
> Probably need some logic to allow folding inch/dech, assuming there isn't some reason to avoid them.
Thanks, I'll try this first


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132322/new/

https://reviews.llvm.org/D132322



More information about the llvm-commits mailing list