[all-commits] [llvm/llvm-project] 6699c3: AMDGPU: Refactor AMDGPUCodeGenPrepare fdiv handling

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri Jul 21 15:55:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6699c37028148c722de2a401c13eef2e92833a03
      https://github.com/llvm/llvm-project/commit/6699c37028148c722de2a401c13eef2e92833a03
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-07-21 (Fri, 21 Jul 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-fdiv.ll
    M llvm/test/CodeGen/AMDGPU/fdiv.ll

  Log Message:
  -----------
  AMDGPU: Refactor AMDGPUCodeGenPrepare fdiv handling

NFC-ish. Does trigger some reordering of the fdiv scalarization. Also
skips scalarizing in more cases where nothing was going to happen. We
can still scalarize in some no-op edge cases.

https://reviews.llvm.org/D155740


  Commit: 8406c3568aa5cd8256a2b359174eae82c747b162
      https://github.com/llvm/llvm-project/commit/8406c3568aa5cd8256a2b359174eae82c747b162
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-07-21 (Fri, 21 Jul 2023)

  Changed paths:
    M llvm/docs/ReleaseNotes.rst
    M llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
    M llvm/test/CodeGen/AMDGPU/GlobalISel/fdiv.f32.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-fdiv.ll
    M llvm/test/CodeGen/AMDGPU/fdiv.ll
    M llvm/test/CodeGen/AMDGPU/fdiv32-to-rcp-folding.ll
    M llvm/test/CodeGen/AMDGPU/fdiv_flags.f32.ll

  Log Message:
  -----------
  AMDGPU: Implement new 2ulp fdiv lowering

Extends the new frexp scaled reciprocal to the general case. The
reciprocal case is just the same thing when frexp of 1 is constant
folded. Could probably clean up the code to rely on that constant
folding.

Improves results for the IEEE path for the default OpenCL division. We
used to only emit the fdiv.fast intrinsic with a 2.5 ulp accuracy
threshold with DAZ, which uses explicit range checks. This gives us a
better fast option with the default IEEE behavior.


  Commit: 6398b687c516d27778a570635d6f2fe1c145cb18
      https://github.com/llvm/llvm-project/commit/6398b687c516d27778a570635d6f2fe1c145cb18
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-07-21 (Fri, 21 Jul 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp

  Log Message:
  -----------
  AMDGPU: Fix variables only used in asserts


Compare: https://github.com/llvm/llvm-project/compare/7c5e4efb099e...6398b687c516


More information about the All-commits mailing list