================ @@ -3388,6 +3398,13 @@ bool SPIRVInstructionSelector::selectGlobalValue( GVType, MIRBuilder, SPIRV::AccessQualifier::ReadWrite, false); } + const unsigned AddrSpace = GV->getAddressSpace(); + SPIRV::StorageClass::StorageClass StorageClass = + addressSpaceToStorageClass(AddrSpace, STI); + + SPIRVType *ResType = + GR.getOrCreateSPIRVPointerType(PointerBaseType, I, TII, StorageClass); + ---------------- Keenuts wrote:
Indeed, Just checked `ResType` usage, but turns out it's redefined in the condition scope. Moved all this code down. https://github.com/llvm/llvm-project/pull/116636 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits