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

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 20 18:45:39 PDT 2022


Allen created this revision.
Allen added reviewers: dmgreen, paulwalker-arm, luismarques, MaskRay, nikic.
Herald added subscribers: StephenFan, ecnelises, hiraditya, kristof.beyls.
Herald added a project: All.
Allen requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

InstCombine will merge the x*5+x into x*6,
then decompose MUL By const into shift/add or shift/sub.
Fixes AArch64 part of https://github.com/llvm/llvm-project/issues/57255.


https://reviews.llvm.org/D132322

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.h
  llvm/test/CodeGen/AArch64/arm64-mul.ll
  llvm/test/CodeGen/AArch64/arm64_32.ll
  llvm/test/CodeGen/AArch64/machine-combiner-madd.ll
  llvm/test/CodeGen/AArch64/mul_pow2.ll
  llvm/test/CodeGen/AArch64/srem-seteq-illegal-types.ll
  llvm/test/CodeGen/AArch64/sve-intrinsics-counting-elems-i32.ll
  llvm/test/CodeGen/AArch64/sve-intrinsics-counting-elems.ll
  llvm/test/CodeGen/AArch64/typepromotion-phisret.ll
  llvm/test/CodeGen/AArch64/urem-seteq-illegal-types.ll
  llvm/test/Transforms/SeparateConstOffsetFromGEP/AArch64/split-gep.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132322.454266.patch
Type: text/x-patch
Size: 24247 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220821/0f704058/attachment-0001.bin>


More information about the llvm-commits mailing list