[PATCH] D158173: AMDGPU: Select f64 fmul by negative power of 2 to ldexp

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 04:45:27 PDT 2023


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

Select fmul x, -K -> ldexp(-x, log2(fabsK))
Select fmul fabs(x), -K -> ldexp(-|x|, log2(fabsK))


https://reviews.llvm.org/D158173

Files:
  llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
  llvm/lib/Target/AMDGPU/SIInstructions.td
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmul.mir
  llvm/test/CodeGen/AMDGPU/fmul-to-ldexp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158173.551090.patch
Type: text/x-patch
Size: 37510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230817/bc3f4b57/attachment-0001.bin>


More information about the llvm-commits mailing list