[llvm] [SPIR-V] Diagnose function used as data pointer without SPV_INTEL_function_pointers (PR #207347)
Marcos Maronas via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 10 02:37:11 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)
----------------
maarquitos14 wrote:
I understand, but the regression might make sense if up until now we were indeed trying to kind of support function pointers even without the extension, and now we made the decision to not support them anymore.
https://github.com/llvm/llvm-project/pull/207347
More information about the llvm-commits
mailing list