[llvm] [AMDGPU] Fix negative immediate offset for unbuffered smem loads (PR #89165)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 12:17:25 PDT 2024


================
@@ -1985,35 +1985,47 @@ bool AMDGPUDAGToDAGISel::SelectScratchSVAddr(SDNode *N, SDValue Addr,
 // offsets available on CI.
 bool AMDGPUDAGToDAGISel::SelectSMRDOffset(SDValue ByteOffsetNode,
                                           SDValue *SOffset, SDValue *Offset,
-                                          bool Imm32Only, bool IsBuffer) const {
+                                          bool Imm32Only, bool IsBuffer,
+                                          bool HasSOffset,
+                                          int64_t ImmOffset) const {
----------------
arsenm wrote:

The offset is already passed in, having a second copy of it in the immediate case is harder to follow 

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


More information about the llvm-commits mailing list