[llvm] [AMDGPU] Disallow negative offset when addressing constant memory (PR #76009)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 18:57:28 PST 2024


https://github.com/arsenm commented:

Changing this does nothing to address the correctness issue. All treatment of constant address space addressing modes here is a very rough heuristic assuming constant loads will really use scalar loads. This patch should be a separate optimization patch to consider after the correctness issue is addressed. 

For fixing selection, it's probably sufficient to modify getSMRDEncodedOffset. If you want to be more aggressive, you can also consider known bits for the register offset in each of the SMRD selection complex patterns 

https://github.com/llvm/llvm-project/pull/76009


More information about the llvm-commits mailing list