[all-commits] [llvm/llvm-project] 72a702: AMDGPU: Correctly lower llvm.sqrt.f32

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Sep 12 13:23:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 72a7024add44cc22dac670e940aaaead0e038f9b
      https://github.com/llvm/llvm-project/commit/72a7024add44cc22dac670e940aaaead0e038f9b
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-09-12 (Tue, 12 Sep 2023)

  Changed paths:
    M llvm/docs/ReleaseNotes.rst
    M llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
    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/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.h
    M llvm/lib/Target/AMDGPU/VOP1Instructions.td
    M llvm/test/Analysis/CostModel/AMDGPU/arith-fp.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/combine-rsq.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fsqrt.mir
    M llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-fdiv.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-sqrt.ll
    M llvm/test/CodeGen/AMDGPU/divergent-branch-uniform-condition.ll
    M llvm/test/CodeGen/AMDGPU/fcanonicalize-elimination.ll
    M llvm/test/CodeGen/AMDGPU/fdiv.f16.ll
    M llvm/test/CodeGen/AMDGPU/fdiv_flags.f32.ll
    M llvm/test/CodeGen/AMDGPU/fsqrt.f32.ll
    M llvm/test/CodeGen/AMDGPU/llvm.amdgcn.rcp.ll
    M llvm/test/CodeGen/AMDGPU/rsq.f32.ll

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

Make codegen emit correctly rounded sqrt by default.

Emit the fast but only kind of fast expansion in AMDGPUCodeGenPrepare
based on !fpmath, like the fdiv case. Hack around visitation ordering
problems from AMDGPUCodeGenPrepare using forward iteration instead of
a well behaved combiner.

https://reviews.llvm.org/D158129


  Commit: 15e0fe0b6122e32657b98daf74a1fce028d2e5bf
      https://github.com/llvm/llvm-project/commit/15e0fe0b6122e32657b98daf74a1fce028d2e5bf
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-09-12 (Tue, 12 Sep 2023)

  Changed paths:
    M clang/lib/Headers/opencl-c-base.h
    M clang/lib/Headers/opencl-c.h
    M clang/lib/Sema/OpenCLBuiltins.td
    A clang/test/CodeGenOpenCL/sqrt-fpmath.cl

  Log Message:
  -----------
  clang/OpenCL: Add inline implementations of sqrt in builtin header

We want the !fpmath metadata to be attached to the sqrt intrinsic to
make it to the backend lowering. Emit an available_externally
definition which uses the builtin, which emits the !fpmath.

Fixes #64264

https://reviews.llvm.org/D156743


  Commit: bca125569f33bd6a27c4c54815697966a823254e
      https://github.com/llvm/llvm-project/commit/bca125569f33bd6a27c4c54815697966a823254e
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-09-12 (Tue, 12 Sep 2023)

  Changed paths:
    M clang/lib/Headers/__clang_hip_math.h
    M clang/test/Headers/__clang_hip_math.hip

  Log Message:
  -----------
  HIP: Directly use f32 sqrt intrinsic

https://reviews.llvm.org/D158131


  Commit: c48248d7f993332d491476d685a47f46c4447a8b
      https://github.com/llvm/llvm-project/commit/c48248d7f993332d491476d685a47f46c4447a8b
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-09-12 (Tue, 12 Sep 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
    M llvm/test/CodeGen/AMDGPU/fsqrt.f32.ll

  Log Message:
  -----------
  AMDGPU: Teach valueIsKnownNeverF32Denorm about frexp

https://reviews.llvm.org/D158130


Compare: https://github.com/llvm/llvm-project/compare/64751ea2c589...c48248d7f993


More information about the All-commits mailing list