[PATCH] D91125: [AArch64][GlobalISel] Port some AArch64 target specific MUL combines from SDAG.

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 22:01:05 PST 2020


aemerson created this revision.
aemerson added a reviewer: paquette.
aemerson added a project: LLVM.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, rovka.
aemerson requested review of this revision.

These do things like turn a multiply of a pow-2+1 into a shift and and add, which is a common pattern that pops up, and is universally better than expensive madd instructions with a constant.

I've added check lines to an existing codegen test since the code being ported is almost identical, however the mul by negative pow2 constant tests don't generate the same code because we're missing some generic G_MUL combines still.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91125

Files:
  llvm/lib/Target/AArch64/AArch64Combine.td
  llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
  llvm/test/CodeGen/AArch64/mul_pow2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91125.304051.patch
Type: text/x-patch
Size: 26342 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201110/2720521d/attachment.bin>


More information about the llvm-commits mailing list