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

via llvm-commits llvm-commits at lists.llvm.org
Tue May 28 12:25:47 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 {
----------------
vangthao95 wrote:

Is there a way to get the ImmOffset value? When selecting for SOffset, the Offset pointer is a nullptr.

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


More information about the llvm-commits mailing list