[llvm] [SPIR-V] Diagnose function used as data pointer without SPV_INTEL_function_pointers (PR #207347)
Arseniy Obolenskiy via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 10 04:41:09 PDT 2026
================
@@ -258,7 +258,9 @@ static void insertBitcasts(MachineFunction &MF, SPIRVGlobalRegistry *GR,
Register Source = MI.getOperand(2).getReg();
Type *ElemTy = getMDOperandAsType(MI.getOperand(3).getMetadata(), 0);
auto SC =
- isa<FunctionType>(ElemTy)
+ isa<FunctionType>(ElemTy) &&
+ ST->canUseExtension(
+ SPIRV::Extension::SPV_INTEL_function_pointers)
----------------
aobolensk wrote:
Done, added test with +SPV_INTEL_function_pointers (pass) and without (failed with an error)
https://github.com/llvm/llvm-project/pull/207347
More information about the llvm-commits
mailing list