llvm-project
adae5c09 - [AMDGPU] Fix 64->32 bit division corner case (#204469)

Commit
169 days ago
[AMDGPU] Fix 64->32 bit division corner case (#204469) Do not implement 64-bit signed division with 32-bit division if operands are only constrained to a 32-bit signed range. -2147483648/-1 != -2147483648/1, but their lower 32-bits are identical. 32-bit division cannot generate the correct result for both sets of operands. Only use 32-bit division if operands are constrained to a 31-bit signed range. Bug appears in both AMDGPUCodeGenPrepare.cpp and AMDGPUISelLowering.cpp. Tested in https://github.com/llvm/llvm-test-suite/pull/428. --------- Signed-off-by: John Lu <John.Lu@amd.com>
Author
Parents
Loading