File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -2831,8 +2831,10 @@ void PPCAIXAsmPrinter::emitGlobalVariableHelper(const GlobalVariable *GV) {
28312831
28322832 // When -fdata-sections is enabled, every GlobalVariable will
28332833 // be put into its own csect; therefore, label is not necessary here.
2834- if (!TM.getDataSections () || GV->hasSection ())
2835- OutStreamer->emitLabel (EmittedInitSym);
2834+ if (!TM.getDataSections () || GV->hasSection ()) {
2835+ if (Csect->getMappingClass () != XCOFF::XMC_TD)
2836+ OutStreamer->emitLabel (EmittedInitSym);
2837+ }
28362838
28372839 // No alias to emit.
28382840 if (!GOAliasMap[GV].size ()) {
Original file line number Diff line number Diff line change 1+ ; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -verify-machineinstrs < %s | FileCheck %s
2+
3+ @a1 = global i32 0 , align 4 #0
4+
5+ define void @foo () {
6+ entry:
7+ store i32 1 , ptr @a1 , align 4
8+ ret void
9+ }
10+
11+ attributes #0 = { "toc-data" }
12+
13+ ; CHECK: .toc
14+ ; CHECK-NEXT: .csect a1[TD],2
15+ ; CHECK-NEXT: .globl a1[TD]
16+ ; CHECK-NEXT: .align 2
17+ ; CHECK-NOT: a1[TD]:
18+ ; CHECK-NEXT: .vbyte 4, 0
You can’t perform that action at this time.
0 commit comments