llvm-project
28eed406 - [AMDGPU][GlobalISel] Fix immediate offset overflow when splitting s.buffer.load

Commit
1 day ago
[AMDGPU][GlobalISel] Fix immediate offset overflow when splitting s.buffer.load When we're splitting a very large (>128 bit) s.buffer.load into 128-bit buffer loads, we add offsets to each split load. Currently, when dealing with ptr.s.buffer.load, the code wouldn't subtract enough from the immediate offset, so that when we added that +128 or +256, we'd overflow the 12-bit immediate, causing silent overflow. This commit fixes the issue by correctly calling the offset splitter with a "alignment" that ensures that all those intermediate loads don't overflow. This matches the behavior in SDag and RegisterBankInfo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Parents
Loading