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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 19:16:22 PDT 2024


================
@@ -9929,9 +9929,9 @@ SDValue SITargetLowering::LowerINTRINSIC_VOID(SDValue Op,
     return SDValue(NewMI, 0);
   }
   case Intrinsic::amdgcn_s_prefetch_data: {
-    // For non-global address space preserve the chain and remove the call.
     if (!AMDGPU::isFlatGlobalAddrSpace(cast<MemSDNode>(Op)->getAddressSpace()))
-      return Op.getOperand(0);
+      report_fatal_error("s_prefetch_data only supports global or constant"
+                         " memory");
----------------
arsenm wrote:

Can check this in the IR verifier 

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


More information about the llvm-commits mailing list