[all-commits] [llvm/llvm-project] 4fdb10: [AMDGPU] Be more careful about using expandDivRem2...

LU-JOHN via All-commits all-commits at lists.llvm.org
Fri Jun 5 06:36:38 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4fdb108b8e203e7fc7ff3ea73b7fc5d009a36954
      https://github.com/llvm/llvm-project/commit/4fdb108b8e203e7fc7ff3ea73b7fc5d009a36954
  Author: LU-JOHN <John.Lu at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
    M llvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i32.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i64.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/urem.i32.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/urem.i64.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
    M llvm/test/CodeGen/AMDGPU/udiv.ll
    M llvm/test/CodeGen/AMDGPU/udiv64.ll
    M llvm/test/CodeGen/AMDGPU/udivrem24.ll
    M llvm/test/CodeGen/AMDGPU/urem64.ll

  Log Message:
  -----------
  [AMDGPU] Be more careful about using expandDivRem24 (#201186)

expandDivRem24 uses v_rcp_f32 which can have an error of one ulp. This
can cause an incorrect calculation of Y/X when abs(Y) > 0x800000. Thus,
do not use expandDivRem24 for unsigned 24-bit values.

---------

Signed-off-by: John Lu <John.Lu at amd.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list