[llvm] [PAC][CodeGen][ELF][AArch64] Support signed TLSDESC (PR #113813)

Anatoly Trosinenko via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 26 11:38:44 PST 2024


================
@@ -9996,7 +10000,13 @@ AArch64TargetLowering::LowerELFGlobalTLSAddress(SDValue Op,
 
   const GlobalAddressSDNode *GA = cast<GlobalAddressSDNode>(Op);
 
-  TLSModel::Model Model = getTargetMachine().getTLSModel(GA->getGlobal());
+  TLSModel::Model Model;
+  if (DAG.getMachineFunction()
+          .getInfo<AArch64FunctionInfo>()
+          ->hasELFSignedGOT())
+    Model = TLSModel::GeneralDynamic;
+  else
+    Model = getTargetMachine().getTLSModel(GA->getGlobal());
----------------
atrosinenko wrote:

Initially, I assumed this would make it possible to use ternary operator as initializer, though it is completely up to you.

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


More information about the llvm-commits mailing list