[PATCH] D70673: [AArch64] Fix over-eager fusing of integer NEON MUL/ADD

Sanne Wouda via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 08:37:43 PST 2019


sanwou01 created this revision.
sanwou01 added a reviewer: dmgreen.
Herald added subscribers: llvm-commits, hiraditya, kristof.beyls.
Herald added a project: LLVM.

If the result of the MUL is used multiple times, it is not usually beneficial to
replace the ADD instruction with an MLA as this results in twice the number of
multiply operations, see overeager_mla_fusing.ll for an example.

The MachineCombiner is able to make this judgment (along with accounting for
critical path lenght and resource usage) so this patch ports the ISel pattern
for MUL/ADD fusing to the MachineCombiner.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70673

Files:
  llvm/include/llvm/CodeGen/MachineCombinerPattern.h
  llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
  llvm/lib/Target/AArch64/AArch64InstrInfo.td
  llvm/test/CodeGen/AArch64/GlobalISel/select-with-no-legality-check.mir
  llvm/test/CodeGen/AArch64/overeager_mla_fusing.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70673.230909.patch
Type: text/x-patch
Size: 19713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191125/8e1c2113/attachment.bin>


More information about the llvm-commits mailing list