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

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 07:59:24 PDT 2024


================
@@ -1315,6 +1315,10 @@ class GCNSubtarget final : public AMDGPUGenSubtargetInfo,
   // of sign-extending.
   bool hasGetPCZeroExtension() const { return GFX12Insts; }
 
+  // \returns true if the target supports signed immediate offset for SMRD
+  // instructions.
+  bool hasSignedSMRDImmOffset() const { return getGeneration() >= GFX9; }
----------------
jayfoad wrote:

We already have a static `hasSMRDSignedImmOffset` in AMDGPUBaseInfo. Can you just expose that instead?

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


More information about the llvm-commits mailing list