[llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

Felix via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 23:58:30 PDT 2023


================
@@ -145,9 +160,92 @@ namespace {
                                                               .addImm(0);
 
         if (IsAIX) {
-          // The variable offset and region handle are copied in r4 and r3. The
-          // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX.
-          if (!IsTLSTPRelMI) {
+          if (MI.getOpcode() == PPC::TLSLDAIX8 ||
+              MI.getOpcode() == PPC::TLSLDAIX) {
+            // It is better to put TLSLDAIX node before LoadOffsetToc node,
+            // because LoadOffsetToc node can use clobbers r4/r5. Search for the
+            // first paired LoadOffsetToc node within the same BB.
+            const PPCSubtarget &Subtarget =
----------------
orcguru wrote:

Updated. Thanks!

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


More information about the llvm-commits mailing list