[clang] [llvm] [SPIR-V] Fixup storage class for global private (PR #116636)
Nathan Gauër via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 02:32:31 PST 2024
================
@@ -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
More information about the cfe-commits
mailing list