[llvm] [LoongArch] Modify expanding code sequence for PseudoLA_TLS_LE (PR #119696)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 17:41:02 PST 2024


================
@@ -1819,6 +1818,10 @@ SDValue LoongArchTargetLowering::getStaticTLSAddr(GlobalAddressSDNode *N,
   SDValue Offset = Large
                        ? SDValue(DAG.getMachineNode(Opc, DL, Ty, Tmp, Addr), 0)
                        : SDValue(DAG.getMachineNode(Opc, DL, Ty, Addr), 0);
+
+  if (IsNormalOrMediumLE)
----------------
wangleiat wrote:

It's better to add a comment here. If it is LE, the `add tp` operation will occur during the pseudo-instruction expansion.

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


More information about the llvm-commits mailing list