[PATCH] D154537: AMDGPU: Fold out sign bit ops on frexp_exp

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 11:44:41 PDT 2023


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

The sign bit has no impact on the exponent, so strip these away. Saves
on the source modifier encoding cost. I left the GlobalISel handling
until there's a resolution to issue #62628.

We should do this in instcombine too, but legalization should be
introducing more frexps than it currently is where this would occur.


https://reviews.llvm.org/D154537

Files:
  llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  llvm/test/CodeGen/AMDGPU/llvm.amdgcn.frexp.exp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154537.537452.patch
Type: text/x-patch
Size: 4194 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230705/e9b18727/attachment.bin>


More information about the llvm-commits mailing list