[PATCH] D153022: AMDGPU: Use correct lowering for llvm.log2.f32

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 06:59:44 PDT 2023


arsenm created this revision.
arsenm added reviewers: AMDGPU, foad, jhuber6, rampitec, Pierre-vh, cdevadas.
Herald added subscribers: StephenFan, jdoerfert, 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.

We previously directly codegened to v_log_f32, which is broken for
denormals. The lowering isn't complicated, you simply need to scale
denormal inputs and adjust the result. Note log and log10 are still
not accurate enough, and will be fixed separately.


https://reviews.llvm.org/D153022

Files:
  llvm/docs/AMDGPUUsage.rst
  llvm/docs/LangRef.rst
  llvm/docs/ReleaseNotes.rst
  llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
  llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td
  llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
  llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
  llvm/lib/Target/AMDGPU/SIISelLowering.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/fpow.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-flog.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-flog10.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-flog2.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fpow.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fpowi.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.powi.ll
  llvm/test/CodeGen/AMDGPU/llvm.log.ll
  llvm/test/CodeGen/AMDGPU/llvm.log10.ll
  llvm/test/CodeGen/AMDGPU/llvm.log2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153022.531736.patch
Type: text/x-patch
Size: 519529 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230615/3d79a4b8/attachment-0001.bin>


More information about the llvm-commits mailing list