[llvm] [SPIR-V] Drop initializer for Import linkage type globals (PR #190942)

Dmitry Sidorov via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 04:46:09 PDT 2026


================
@@ -6156,6 +6156,9 @@ bool SPIRVInstructionSelector::selectGlobalValue(
   const std::optional<SPIRV::LinkageType::LinkageType> LnkType =
       getSpirvLinkageTypeFor(STI, *GV);
 
+  if (LnkType && *LnkType == SPIRV::LinkageType::Import)
+    Init = nullptr;
----------------
MrSidims wrote:

I'm not 100% sure if this fix is correct. What is the original LLVM linkage that got mapped to Import?

https://github.com/llvm/llvm-project/pull/190942


More information about the llvm-commits mailing list