[llvm] [AMDGPU] Disallow negative s_load offsets in isLegalAddressingMode (PR #91327)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue May 7 06:58:19 PDT 2024


================
@@ -1604,6 +1604,14 @@ bool SITargetLowering::isLegalAddressingMode(const DataLayout &DL,
         return false;
     }
 
+    if (AS == AMDGPUAS::CONSTANT_ADDRESS && AM.BaseOffs < 0) {
----------------
arsenm wrote:

should also cover the constant_32bit (but again, this whole thing is just a weak heuristic for might-use-scalar-loads) 

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


More information about the llvm-commits mailing list