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

Mateja Marjanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 5 07:39:40 PST 2021


matejam created this revision.
matejam added reviewers: mbrkusanin, Petar.Avramovic, foad, arsenm.
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 in which two function arguments are multiplied, the
result of the multiplication gets extended, which gets added to the
result of the multiplication of another two arguments, and the result
of that gets added to the last function argument. The result of the
combiner will be a fma instruction within a fma instruction.


https://reviews.llvm.org/D98047

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-ext-fma.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98047.328529.patch
Type: text/x-patch
Size: 36548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210305/744d29bb/attachment.bin>


More information about the llvm-commits mailing list