[llvm] [TargetLowering] Fix the problem of emulated-TLS implementation witho… (PR #101490)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 3 20:53:44 PDT 2024
================
@@ -10225,8 +10225,11 @@ SDValue TargetLowering::LowerToTLSEmulatedModel(const GlobalAddressSDNode *GA,
ArgListTy Args;
ArgListEntry Entry;
- std::string NameString = ("__emutls_v." + GA->getGlobal()->getName()).str();
- Module *VariableModule = const_cast<Module*>(GA->getGlobal()->getParent());
+ const GlobalValue *GV = GA->getGlobal();
+ GV = GV->stripPointerCastsAndAliases()
+ ? cast<GlobalValue>(GV->stripPointerCastsAndAliases()) : GV;
----------------
cceerczw wrote:
ok, fixed
https://github.com/llvm/llvm-project/pull/101490
More information about the llvm-commits
mailing list