[PATCH] D98048: [AMDGPU][GlobalISel] Transform (fsub (fneg (fmul, x, y)), z) -> (fma (fneg x), y, (fneg z))
Mateja Marjanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 5 07:47:48 PST 2021
- Previous message: [PATCH] D98047: [AMDGPU][GlobalISel] Transform (fadd (fma x, y, (fpext (fmul u, v))), z) -> (fma x, y, (fma (fpext u), (fpext v), z))
- Next message: [PATCH] D98049: [AMDGPU][GlobalISel] Transform (fsub (fpext (fmul x, y)), z) -> (fma (fpext x), (fpext y), (fneg z))
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
matejam created this revision.
matejam added reviewers: foad, arsen, 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 case that has one multiplication, which gets negated, and
from that the third argument is subtracted. This combiner will transform
that into two negations and one fma/fmad instruction.
https://reviews.llvm.org/D98048
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-neg-mul.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98048.328531.patch
Type: text/x-patch
Size: 26781 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210305/0b51e7de/attachment-0001.bin>
- Previous message: [PATCH] D98047: [AMDGPU][GlobalISel] Transform (fadd (fma x, y, (fpext (fmul u, v))), z) -> (fma x, y, (fma (fpext u), (fpext v), z))
- Next message: [PATCH] D98049: [AMDGPU][GlobalISel] Transform (fsub (fpext (fmul x, y)), z) -> (fma (fpext x), (fpext y), (fneg z))
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list