[llvm] [AMDGPU] Error on non-global pointer with s_prefetch_data (PR #107624)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 05:55:35 PDT 2024


================
@@ -6281,6 +6281,12 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
           "Value for inactive lanes must be a VGPR function argument", &Call);
     break;
   }
+  case Intrinsic::amdgcn_s_prefetch_data: {
+    unsigned AS = Call.getArgOperand(0)->getType()->getPointerAddressSpace();
+    Check(AS == 0 || AS == 1 || AS == 4,
----------------
arsenm wrote:

Can include llvm/Support/AMDGPUAddrSpace.h and use the enums.

We also probably could move the isExtendedGlobalAddrSpace helpers there 

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


More information about the llvm-commits mailing list