[PATCH] D97938: [AMDGPU][GlobalISel] Transform (fadd (fma x, y, (fmul u, v)), z) -> (fma x, y, (fma u, v, z))

Mateja Marjanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 4 05:06:48 PST 2021


matejam created this revision.
matejam added reviewers: foad, arsenm, mbrkusanin, Petar.Avramovic.
matejam added a project: LLVM.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, rovka, yaxunl, nhaehnle, jvesely, kzhuravl.
matejam requested review of this revision.
Herald added a subscriber: wdng.

Instead of add and mul instructions, use v_mad, v_mac or v_fma if fma
instructions are faster and are legal for the given architecture.
Combiner for a case that has a fma/fmad instruction as an operand for
the given MI. The transformed instruction has a fma/fmad instruction
inside another fma/fmad instruction.


https://reviews.llvm.org/D97938

Files:
  llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
  llvm/include/llvm/Target/GlobalISel/Combine.td
  llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-fma-mul.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97938.328132.patch
Type: text/x-patch
Size: 44699 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210304/e8f37103/attachment.bin>


More information about the llvm-commits mailing list