[all-commits] [llvm/llvm-project] ed556a: AMDGPU: Correctly lower llvm.exp2.f32

Matt Arsenault via All-commits all-commits at lists.llvm.org
Wed Jul 5 14:24:14 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ed556a1ad5461e5cce105f8a42b802cc5e9dbb28
      https://github.com/llvm/llvm-project/commit/ed556a1ad5461e5cce105f8a42b802cc5e9dbb28
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-07-05 (Wed, 05 Jul 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/test/CodeGen/AMDGPU/GlobalISel/fpow.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fexp2.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fexp.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fexp2.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/input-mods.ll
    M llvm/test/CodeGen/AMDGPU/llvm.exp.ll
    M llvm/test/CodeGen/AMDGPU/llvm.exp2.ll

  Log Message:
  -----------
  AMDGPU: Correctly lower llvm.exp2.f32

Previously this did a fast math expansion only.


  Commit: 549166624851094d251f1625d133cfea2dce4ceb
      https://github.com/llvm/llvm-project/commit/549166624851094d251f1625d133cfea2dce4ceb
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-07-05 (Wed, 05 Jul 2023)

  Changed paths:
    M llvm/docs/AMDGPUUsage.rst
    M llvm/docs/LangRef.rst
    M llvm/docs/ReleaseNotes.rst
    M llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
    M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fexp.mir
    M llvm/test/CodeGen/AMDGPU/llvm.exp.ll

  Log Message:
  -----------
  AMDGPU: Correctly lower llvm.exp.f32

The library expansion has too many paths for all the permutations of
DAZ, unsafe and the 3 exp functions. It's easier to expand it in the
backend when we know all of these things. The library currently misses
the no-infinity check on the overflow, which this handles optimizing
out.

Some of the <3 x half> fast tests regress due to vector widening
dropping flags which will be fixed separately.

Apparently there is no exp10 intrinsic, but there should be. Adds some
deadish code in preparation for adding one while I'm following along
with the current library expansion.


Compare: https://github.com/llvm/llvm-project/compare/515bd1c9b881...549166624851


More information about the All-commits mailing list