[PATCH] D132348: [AIX] use the original name as the input to create the new symbol for TLS symbol.
Esme Yi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 23 22:37:23 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdfe55cc1cd24: [AIX] use the original name as the input to create the new symbol for TLS… (authored by Esme).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132348/new/
https://reviews.llvm.org/D132348
Files:
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/test/CodeGen/PowerPC/aix-xcoff-tls-rename.ll
Index: llvm/test/CodeGen/PowerPC/aix-xcoff-tls-rename.ll
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/PowerPC/aix-xcoff-tls-rename.ll
@@ -0,0 +1,15 @@
+; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \
+; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false < %s | FileCheck %s
+
+; CHECK: .extern .__tls_get_addr[PR]
+; CHECK-NEXT: .csect .tdata[TL],2
+; CHECK-NEXT: .globl _Renamed..24f_f # @"f$f"
+; CHECK-NEXT: .rename _Renamed..24f_f,"f$f"
+
+@"f$f" = thread_local global i32 10, align 4
+
+define void @fun() {
+entry:
+ store i32 1, ptr @"f$f", align 4
+ ret void
+}
Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -2564,7 +2564,7 @@
SmallString<128> Name;
StringRef Prefix = ".";
Name += Prefix;
- Name += I.first.first->getName();
+ Name += cast<MCSymbolXCOFF>(I.first.first)->getSymbolTableName();
MCSymbol *S = OutContext.getOrCreateSymbol(Name);
TCEntry = cast<MCSectionXCOFF>(
getObjFileLowering().getSectionForTOCEntry(S, TM));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132348.455075.patch
Type: text/x-patch
Size: 1296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220824/29a4b9c6/attachment.bin>
More information about the llvm-commits
mailing list