[all-commits] [llvm/llvm-project] 077ec0: [AMDGPU] Avoid errors with 23-bit division and rem...
LU-JOHN via All-commits
all-commits at lists.llvm.org
Wed Jun 10 12:27:16 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 077ec06128e27e3dce2b97563dab703f89024ddf
https://github.com/llvm/llvm-project/commit/077ec06128e27e3dce2b97563dab703f89024ddf
Author: LU-JOHN <John.Lu at amd.com>
Date: 2026-06-10 (Wed, 10 Jun 2026)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
M llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
M llvm/test/CodeGen/AMDGPU/sdiv.ll
M llvm/test/CodeGen/AMDGPU/sdiv64.ll
M llvm/test/CodeGen/AMDGPU/sdivrem24.ll
M llvm/test/CodeGen/AMDGPU/srem64.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] Avoid errors with 23-bit division and remainder. (#202753)
Extensive testing of expandDivRem24 found an error when calculating Y/X
when Y = (0x7FFFFF/X)*X-1. There are
36 values of X for which this happens. Limit expansion to 23-bit signed
and 22-bit unsigned to avoid this issue.
Testing added in https://github.com/llvm/llvm-test-suite/pull/419.
---------
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