[PATCH] D96614: [AMDGPU][GlobalISel] Transform (fsub (fmul x, y), z) -> (fma x, y, -z)
Mateja Marjanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 12 09:29:53 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 sub 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 subtraction and one
multiplication instruction and transforms them into some of the fma
instructions depending on the architecture.
https://reviews.llvm.org/D96614
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-sub-mul.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96614.323359.patch
Type: text/x-patch
Size: 19909 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210212/1012d11f/attachment.bin>
More information about the llvm-commits
mailing list