[AIX] follow-up of D124654.

Emitting the remaining aliases instead of reporting
an error to avoid SPEC2017 PEAK failures.
And mark this as a TODO.
This commit is contained in:
esmeyi 2022-07-21 01:10:09 -04:00
parent 485190df95
commit 339392ecf2
2 changed files with 20 additions and 6 deletions

View File

@ -3359,9 +3359,12 @@ void AsmPrinter::emitGlobalConstant(const DataLayout &DL, const Constant *CV,
}
if (!AliasList)
return;
for (const auto &AliasPair : *AliasList)
report_fatal_error("Aliases with offset " + Twine(AliasPair.first) +
" were not emitted.");
// TODO: These remaining aliases are not emitted in the correct location. Need
// to handle the case where the alias offset doesn't refer to any sub-element.
for (auto &AliasPair : *AliasList) {
for (const GlobalAlias *GA : AliasPair.second)
OutStreamer->emitLabel(getSymbol(GA));
}
}
void AsmPrinter::emitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) {

View File

@ -1,8 +1,19 @@
;; TODO: The alias offset doesn't refer to any sub-element.
; RUN: not --crash llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \
; RUN: -data-sections=false < %s 2>&1 | FileCheck --check-prefix=ERROR %s
; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \
; RUN: -data-sections=false < %s | FileCheck %s
; ERROR: Aliases with offset 1 were not emitted.
;; FIXME: The alias is not emitted in the correct location.
@ConstVector = global <2 x i64> <i64 1, i64 2>
@var = alias i64, getelementptr inbounds (i8, ptr @ConstVector, i32 1)
; CHECK: .csect .data[RW],4
; CHECK-NEXT: .globl ConstVector # @ConstVector
; CHECK-NEXT: .globl var
; CHECK-NEXT: .align 4
; CHECK-NEXT: ConstVector:
; CHECK-NEXT: .vbyte 4, 0 # 0x1
; CHECK-NEXT: .vbyte 4, 1
; CHECK-NEXT: .vbyte 4, 0 # 0x2
; CHECK-NEXT: .vbyte 4, 2
; CHECK-NEXT: var: