================ @@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; + if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) ---------------- AlexVlx wrote:
Yes I am a bit confused as to why this is necessary, DataLayout already encodes that global is AS1. If you're seeing globals end up in generic (I am excluding llvm.used and llvm.compiler.used here, since they are special and should be in generic/0) it might just be a case where CodeGen has a subtle bug. Could you please say a bit more as to what is motivating this change? Thank you! https://github.com/llvm/llvm-project/pull/134399 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits