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) {
2831
2831
2832
2832
// When -fdata-sections is enabled, every GlobalVariable will
2833
2833
// 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
+ }
2836
2838
2837
2839
// No alias to emit.
2838
2840
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