[PATCH] D143963: AMDGPU: Override getNegatedExpression constant handling

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 16:23:27 PST 2023


arsenm created this revision.
arsenm added reviewers: AMDGPU, rampitec, foad, sebastian-ne, Pierre-vh.
Herald added subscribers: kosarev, 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.

Ignore the multiple use heuristics of the default
implementation, and report cost based on inline immediates. This
is mostly interesting for -0 vs. 0. Gets a few small improvements.
fneg_fadd_0_f16 is a small regression. We could probably avoid this
if we handled folding fneg into div_fixup.


https://reviews.llvm.org/D143963

Files:
  llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  llvm/test/CodeGen/AMDGPU/fdiv32-to-rcp-folding.ll
  llvm/test/CodeGen/AMDGPU/fneg-combines.f16.ll
  llvm/test/CodeGen/AMDGPU/fneg-combines.new.ll
  llvm/test/CodeGen/AMDGPU/v_pack.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143963.497145.patch
Type: text/x-patch
Size: 14537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230214/0f374c9f/attachment.bin>


More information about the llvm-commits mailing list