[all-commits] [llvm/llvm-project] 89ccfa: AMDGPU: Use correct lowering for llvm.log2.f32

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri Jun 23 05:37:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89ccfa1b3978fa2c2945dec743401f090a23abec
      https://github.com/llvm/llvm-project/commit/89ccfa1b3978fa2c2945dec743401f090a23abec
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-06-23 (Fri, 23 Jun 2023)

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

  Log Message:
  -----------
  AMDGPU: Use correct lowering for llvm.log2.f32

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.




More information about the All-commits mailing list