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

Daniil Kovalev via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 27 04:19:57 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());
----------------
kovdan01 wrote:

Agree, ternary looks better here, changed in dcdbcdd133b329fa33f64ce5a7f57b8fcf785e4b

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


More information about the llvm-commits mailing list