[PATCH] D155652: AMDGPU: Fold fsub [+-0] into fneg when folding source modifiers
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 15:35:35 PDT 2023
arsenm created this revision.
arsenm added reviewers: AMDGPU, foad, rampitec, Pierre-vh, b-sumner.
Herald added subscribers: StephenFan, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
This isn't always folded to fneg for a freestanding fsub depending on
the denormal mode. When matching source modifiers, we're implicitly
canonicalizing the input so we can fold it here.
Doesn't bother handling the VOP3P case since it's only relevant with
DAZ, which nobody really uses with f16.
https://reviews.llvm.org/D155652
Files:
llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
llvm/test/CodeGen/AMDGPU/fneg-combines.ll
llvm/test/CodeGen/AMDGPU/fneg-combines.new.ll
llvm/test/CodeGen/AMDGPU/fsub-as-fneg-src-modifier.ll
llvm/test/CodeGen/AMDGPU/llvm.exp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155652.541760.patch
Type: text/x-patch
Size: 12734 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230718/3499149c/attachment.bin>
More information about the llvm-commits
mailing list