[llvm] [AIX][TLS] Optimize the small local-exec access sequence for non-zero offsets (PR #71485)

Amy Kwan via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 10:21:17 PST 2024


================
@@ -7578,6 +7668,10 @@ void PPCDAGToDAGISel::PeepholePPC64() {
     if (isVSXSwap(SDValue(N, 0)))
       reduceVSXSwap(N, CurDAG);
 
+    // This optimization is performed for non-TOC-based local-exec accesses.
+    if (HasAIXSmallLocalExecTLS)
+      foldADDIForLocalExecAccesses(N, CurDAG);
----------------
amy-kwan wrote:

I think this is fine. Since we can fold addi instructions first, and then after there may be load and store instructions that we can fold, which can only happen if we continue further into this loop.

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


More information about the llvm-commits mailing list