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

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 08:44:14 PST 2023


================
@@ -1556,6 +1629,69 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) {
   EmitToStreamer(*OutStreamer, TmpInst);
 }
 
+// For non-TOC-based local-exec variables that have a non-zero offset,
+// we need to create a new MCExpr that adds the non-zero offset to the address
+// of the local-exec variable that will be used in either an addi, load or
+// store. However, the final displacement for these instructions must be
+// between [-32768, 32768), so if the TLS address + it's non-zero offset is
----------------
stephenpeckham wrote:

```suggestion
// between [-32768, 32768), so if the TLS address + its non-zero offset is
```

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


More information about the llvm-commits mailing list