[PATCH] D93305: [AMDGPU][GlobalISel] Add combiners for v_mad/v_mac/v_fma

Mateja Marjanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 09:24:02 PST 2021


matejam updated this revision to Diff 323356.
matejam retitled this revision from "[AMDGPU][GlobalISel] Add combiner for generating G_FMAD" to "[AMDGPU][GlobalISel] Add combiners for v_mad/v_mac/v_fma".
matejam added a comment.
Herald added a subscriber: nemanjai.

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 simple case that has only one add and one mul instruction
and transforms them into some of the fma instructions depending on the
architecture.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93305/new/

https://reviews.llvm.org/D93305

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93305.323356.patch
Type: text/x-patch
Size: 32842 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210212/227211ac/attachment.bin>


More information about the llvm-commits mailing list