[clang] [llvm] [SPIR-V] Implement SPV_KHR_untyped_pointers extension (PR #201233)
Nick Sarnie via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 5 08:16:11 PDT 2026
================
@@ -2848,8 +2906,11 @@ bool SPIRVInstructionSelector::selectAddrSpaceCast(Register ResVReg,
SPIRVTypeInst SrcPtrTy = GR.getSPIRVTypeForVReg(SrcPtr);
// don't generate a cast for a null that may be represented by OpTypeInt
- if (SrcPtrTy->getOpcode() != SPIRV::OpTypePointer ||
- ResType->getOpcode() != SPIRV::OpTypePointer)
+ auto IsPtrTy = [](SPIRVTypeInst T) {
+ return T && (T->getOpcode() == SPIRV::OpTypePointer ||
----------------
sarnex wrote:
sure, thanks
https://github.com/llvm/llvm-project/pull/201233
More information about the cfe-commits
mailing list