[llvm-branch-commits] [lld] [lld][LoongArch] Convert TLS IE to LE in the normal or medium code model (PR #123680)
Zhaoxin Yang via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Mar 20 17:48:52 PDT 2025
================
@@ -1002,6 +1008,87 @@ static bool relax(Ctx &ctx, InputSection &sec) {
return changed;
}
+// Convert TLS IE to LE in the normal or medium code model.
+// Original code sequence:
+// * pcalau12i $a0, %ie_pc_hi20(sym)
+// * ld.d $a0, $a0, %ie_pc_lo12(sym)
+//
+// The code sequence converted is as follows:
+// * lu12i.w $a0, %le_hi20(sym) # le_hi20 != 0, otherwise NOP
+// * ori $a0 $a0, %le_lo12(sym)
----------------
ylzsx wrote:
Yeah, I have fixed it.
https://github.com/llvm/llvm-project/pull/123680
More information about the llvm-branch-commits
mailing list