[PATCH] D93243: [FPEnv][AMDGPU] Disable FSUB(-0,X)->FNEG(X) DAGCombine when subnormals are preserved
Cameron McInally via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 14 14:01:20 PST 2020
cameron.mcinally created this revision.
cameron.mcinally added a reviewer: arsenm.
Herald added subscribers: ecnelises, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
cameron.mcinally requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
One more push on this before the year is over...
This patch disables the FSUB(-0,X)->FNEG(X) DAG combine when we're preserving subnormals. It requires updating the existing AMDGPU tests to use the fneg IR instruction, in place of the old fsub(-0,X) canonical form, since AMDGPU is the only backend currently checking the DenormalMode flags.
Note that this will require follow-up optimizations to make sure the fsub(-0,X) form is handled appropriately. But I think that can be done in a separate patch.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D93243
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AMDGPU/clamp-modifier.ll
llvm/test/CodeGen/AMDGPU/clamp.ll
llvm/test/CodeGen/AMDGPU/fdiv32-to-rcp-folding.ll
llvm/test/CodeGen/AMDGPU/fma-combine.ll
llvm/test/CodeGen/AMDGPU/fneg-combines.ll
llvm/test/CodeGen/AMDGPU/fpext-free.ll
llvm/test/CodeGen/AMDGPU/fptrunc.f16.ll
llvm/test/CodeGen/AMDGPU/known-never-snan.ll
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.fmad.ftz.ll
llvm/test/CodeGen/AMDGPU/mad-combine.ll
llvm/test/CodeGen/AMDGPU/mad-mix.ll
llvm/test/CodeGen/AMDGPU/rcp-pattern.ll
llvm/test/CodeGen/AMDGPU/rsq.ll
llvm/test/CodeGen/AMDGPU/v_mac.ll
llvm/test/CodeGen/AMDGPU/v_mac_f16.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93243.311696.patch
Type: text/x-patch
Size: 23675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201214/adf239c1/attachment.bin>
More information about the llvm-commits
mailing list