[PATCH] D152166: [InstCombine] Expand contractable fmuladd into fmul + fadd

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 07:35:35 PDT 2023


foad created this revision.
foad added reviewers: nikic, spatel.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
foad requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The intention of fmuladd is that it represents an fmul and an fadd that
may be fused with each other but may not be fused with any other
instructions. If the fmuladd is marked as contractable then this
restriction disappears, so we should canonicalize it to separate
(contractable) fmul and fadd instructions, which are generally better
supported by InstCombine and other optimization passes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152166

Files:
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  llvm/test/Transforms/InstCombine/fma.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-fused-dominance.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-fused-loops.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-fused-multiple-blocks.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-fused.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-minimal.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152166.528439.patch
Type: text/x-patch
Size: 111596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230605/722117b7/attachment.bin>


More information about the llvm-commits mailing list