[llvm] [SystemZ][z/OS] Emit alignment in HLASM syntax (PR #222121)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 12:54:28 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-systemz
Author: Kai Nacke (redstar)
<details>
<summary>Changes</summary>
While trying to understand a crash, I noted that the emitted alignment in HLASM is wrong. There are 2 issues:
- The decision which suffix to use looks at `FillLen` instead of `Alignment`
- The label alignment `DS 0H` is hard-coded
This change fixes the issues. To get the correct suffix for the label alignment, the emission of the alignment is postponed in certain cases, and the label definition picks up the alignment suffix.
---
Patch is 59.94 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/222121.diff
27 Files Affected:
- (modified) llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp (+64-41)
- (modified) llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h (+6)
- (modified) llvm/test/CodeGen/SystemZ/call-zos-01.ll (+42-42)
- (modified) llvm/test/CodeGen/SystemZ/call-zos-02.ll (+1-1)
- (modified) llvm/test/CodeGen/SystemZ/call-zos-i128.ll (+2-2)
- (modified) llvm/test/CodeGen/SystemZ/call-zos-vararg.ll (+45-45)
- (modified) llvm/test/CodeGen/SystemZ/mixed-ptr-sizes.ll (+17-17)
- (modified) llvm/test/CodeGen/SystemZ/zos-ada-relocations.ll (+2-2)
- (modified) llvm/test/CodeGen/SystemZ/zos-ada.ll (+4-4)
- (modified) llvm/test/CodeGen/SystemZ/zos-align.ll (+2-1)
- (modified) llvm/test/CodeGen/SystemZ/zos-frameaddr.ll (+6-6)
- (modified) llvm/test/CodeGen/SystemZ/zos-func-alias.ll (+2-2)
- (modified) llvm/test/CodeGen/SystemZ/zos-hlasm-out.ll (+3-4)
- (modified) llvm/test/CodeGen/SystemZ/zos-jumptable.ll (+3-3)
- (modified) llvm/test/CodeGen/SystemZ/zos-landingpad.ll (+1-1)
- (modified) llvm/test/CodeGen/SystemZ/zos-no-personality.ll (+2-2)
- (modified) llvm/test/CodeGen/SystemZ/zos-ppa1-argarea.ll (+11-11)
- (modified) llvm/test/CodeGen/SystemZ/zos-ppa1-name.ll (+5-5)
- (modified) llvm/test/CodeGen/SystemZ/zos-ppa1.ll (+14-17)
- (modified) llvm/test/CodeGen/SystemZ/zos-ppa2.ll (+3-3)
- (modified) llvm/test/CodeGen/SystemZ/zos-prologue-epilog.ll (+35-35)
- (modified) llvm/test/CodeGen/SystemZ/zos-ret-addr.ll (+3-3)
- (modified) llvm/test/CodeGen/SystemZ/zos-simple-test.ll (+1-1)
- (modified) llvm/test/CodeGen/SystemZ/zos-stack-protector.ll (+9-9)
- (modified) llvm/test/CodeGen/SystemZ/zos-stackpointer.ll (+1-1)
- (modified) llvm/test/CodeGen/SystemZ/zos-symbol-2.ll (+1-1)
- (modified) llvm/test/CodeGen/SystemZ/zos-xplink64-bare-i32-arg.ll (+3-3)
``````````diff
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
index df1b45c381023..aca5a7398fa50 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
@@ -12,6 +12,7 @@
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCSectionGOFF.h"
#include "llvm/MC/MCSymbolGOFF.h"
+#include "llvm/Support/Alignment.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Signals.h"
#include <sstream>
@@ -180,6 +181,7 @@ static void emitCATTR(raw_ostream &OS, StringRef Name, GOFF::ESDRmode Rmode,
void SystemZHLASMAsmStreamer::changeSection(MCSection *Section,
uint32_t Subsection) {
+ flushPendingAlignment();
auto &Sec = *static_cast<MCSectionGOFF *>(Section);
auto EmitExternalName = [&Sec, this]() {
if (Sec.hasExternalName())
@@ -243,37 +245,6 @@ void SystemZHLASMAsmStreamer::changeSection(MCSection *Section,
EmitEOL();
}
-void SystemZHLASMAsmStreamer::emitAlignmentDS(uint64_t ByteAlignment,
- std::optional<int64_t> Value,
- unsigned ValueSize,
- unsigned MaxBytesToEmit) {
- if (!isPowerOf2_64(ByteAlignment))
- report_fatal_error("Only power-of-two alignments are supported ");
-
- OS << " DS 0";
- switch (ValueSize) {
- default:
- llvm_unreachable("Invalid size for machine code value!");
- case 1:
- OS << "B";
- break;
- case 2:
- OS << "H";
- break;
- case 4:
- OS << "F";
- break;
- case 8:
- OS << "D";
- break;
- case 16:
- OS << "Q";
- break;
- }
-
- EmitEOL();
-}
-
void SystemZHLASMAsmStreamer::emitRawComment(const Twine &T, bool TabPrefix) {
OS << MAI->getCommentString() << T;
EmitEOL();
@@ -310,22 +281,69 @@ void SystemZHLASMAsmStreamer::EmitComment() {
CommentToEmit.clear();
}
+void SystemZHLASMAsmStreamer::flushPendingAlignment() {
+ if (!PendingAlignSuffix)
+ return;
+ OS << " DS 0" << *PendingAlignSuffix;
+ EmitEOL();
+ PendingAlignSuffix.reset();
+}
+
void SystemZHLASMAsmStreamer::emitValueToAlignment(Align Alignment,
int64_t Fill,
uint8_t FillLen,
unsigned MaxBytesToEmit) {
- emitAlignmentDS(Alignment.value(), Fill, FillLen, MaxBytesToEmit);
+ unsigned int A = Log2(Alignment);
+ if (A > 12)
+ return getContext().reportError(SMLoc(), "Alignment > 4096 not supported");
+ if (FillLen > 1)
+ return getContext().reportError(SMLoc(), "Fill length > 1 not supported");
+ if (Fill == 0 && A < 5) {
+ // Simple form: defer so the next emitLabel() can absorb it (e.g. "foo DS
+ // 0H" instead of a standalone "DS 0H" followed by "foo DS 0B").
+ flushPendingAlignment();
+ static const char SUFFIX[5] = {'B', 'H', 'F', 'D', 'Q'};
+ PendingAlignSuffix = SUFFIX[A];
+ } else if (A) {
+ // Non-simple form with a fill value. The HLASM DC duplication factor must
+ // be an absolute expression, so we cannot use the location counter (*)
+ // directly — it is a relocatable term. We also cannot use & as a bitwise
+ // AND operator, as ordinary HLASM expressions only support +, -, *, /.
+ //
+ // The solution is to introduce a temporary EQU symbol P defined as
+ // (*-SECTION), which is the difference of two co-relocatable terms and
+ // therefore absolute. With that absolute offset P and boundary B the
+ // padding count is:
+ //
+ // B - (P - ((P-1)/B)*B)
+ //
+ // which is the integer-division modulo idiom. The (P-1) bias ensures the
+ // count is 0 (not B) when already aligned.
+ unsigned int B = 1 << A;
+ // Retrieve the section name as the relocatable anchor (&POINT equivalent).
+ StringRef Anchor =
+ getCurrentSectionOnly()->getBeginSymbol()
+ ? getCurrentSectionOnly()->getBeginSymbol()->getName()
+ : static_cast<MCSectionGOFF *>(getCurrentSectionOnly())->getName();
+ // Emit the temporary EQU (P = *-Anchor) on its own line.
+ MCSymbol *Pad = getContext().createNamedTempSymbol("PAD");
+ MCStreamer::emitLabel(Pad);
+ StringRef PSym = Pad->getName();
+ OS << PSym << " EQU *-" << Anchor;
+ EmitEOL();
+ // Emit the DC with the fill value and computed duplication factor.
+ OS << " DC (" << B << "-(" << PSym << "-((" << PSym << "-1)/" << B << ")*"
+ << B << "))";
+ // Append the fill constant operand: XL1'xx'.
+ OS << "XL1'" << utohexstr(Fill, /*LowerCase=*/false, 2) << "'";
+ EmitEOL();
+ }
}
void SystemZHLASMAsmStreamer::emitCodeAlignment(Align Alignment,
const MCSubtargetInfo &STI,
unsigned MaxBytesToEmit) {
- // Emit with a text fill value.
- if (MAI->getTextAlignFillValue())
- emitAlignmentDS(Alignment.value(), MAI->getTextAlignFillValue(), 1,
- MaxBytesToEmit);
- else
- emitAlignmentDS(Alignment.value(), std::nullopt, 1, MaxBytesToEmit);
+ emitValueToAlignment(Alignment, 0, 1, MaxBytesToEmit);
}
void SystemZHLASMAsmStreamer::emitBytes(StringRef Data) {
@@ -333,7 +351,7 @@ void SystemZHLASMAsmStreamer::emitBytes(StringRef Data) {
"Cannot emit contents before setting section!");
if (Data.empty())
return;
-
+ flushPendingAlignment();
OS << " DC ";
size_t Len = Data.size();
SmallVector<uint8_t> Chars;
@@ -445,6 +463,7 @@ void SystemZHLASMAsmStreamer::addEncodingComment(const MCInst &Inst,
void SystemZHLASMAsmStreamer::emitInstruction(const MCInst &Inst,
const MCSubtargetInfo &STI) {
+ flushPendingAlignment();
// Show the encoding in a comment if we have a code emitter.
addEncodingComment(Inst, STI);
EmitEOL();
@@ -479,7 +498,9 @@ void SystemZHLASMAsmStreamer::emitLabel(MCSymbol *Symbol, SMLoc Loc) {
}
if (EmitLabelAndEntry) {
- OS << Sym->getName() << " DS 0H";
+ char Suffix = PendingAlignSuffix.value_or('B');
+ PendingAlignSuffix.reset();
+ OS << Sym->getName() << " DS 0" << Suffix;
EmitEOL();
}
}
@@ -502,6 +523,7 @@ void SystemZHLASMAsmStreamer::emitCommonSymbol(MCSymbol *S, uint64_t Size,
}
void SystemZHLASMAsmStreamer::emitRawTextImpl(StringRef String) {
+ flushPendingAlignment();
String.consume_back("\n");
OS << String;
EmitEOL();
@@ -581,7 +603,7 @@ void SystemZHLASMAsmStreamer::emitValueImpl(const MCExpr *Value, unsigned Size,
assert(Size <= 8 && "Invalid size");
assert(getCurrentSectionOnly() &&
"Cannot emit contents before setting section!");
-
+ flushPendingAlignment();
MCStreamer::emitValueImpl(Value, Size, Loc);
OS << " DC ";
emitHLASMValueImpl(Value, Size, true);
@@ -589,6 +611,7 @@ void SystemZHLASMAsmStreamer::emitValueImpl(const MCExpr *Value, unsigned Size,
}
void SystemZHLASMAsmStreamer::finishImpl() {
+ flushPendingAlignment();
for (auto &Symbol : getAssembler().symbols()) {
if (Symbol.isTemporary() || !Symbol.isRegistered() || Symbol.isDefined())
continue;
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h
index 70f8fb0aede70..8a35771d8dae3 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h
@@ -43,6 +43,11 @@ class SystemZHLASMAsmStreamer final : public MCAsmBaseStreamer {
const MCAsmInfo *MAI;
std::unique_ptr<MCInstPrinter> InstPrinter;
bool IsVerboseAsm = false;
+ // Deferred simple alignment suffix (e.g. 'H' for DS 0H). Set by
+ // emitValueToAlignment() and consumed by the next emitLabel() call.
+ // Flushed as a standalone DS statement by flushPendingAlignment() if any
+ // other emission follows first.
+ std::optional<char> PendingAlignSuffix;
public:
SystemZHLASMAsmStreamer(MCContext &Context,
@@ -65,6 +70,7 @@ class SystemZHLASMAsmStreamer final : public MCAsmBaseStreamer {
void EmitEOL();
void EmitComment();
+ void flushPendingAlignment();
/// Add a comment that can be emitted to the generated .s file to make the
/// output of the compiler more readable. This only affects the MCAsmStreamer
diff --git a/llvm/test/CodeGen/SystemZ/call-zos-01.ll b/llvm/test/CodeGen/SystemZ/call-zos-01.ll
index a6006035dcaa1..fa39d8b1c7e98 100644
--- a/llvm/test/CodeGen/SystemZ/call-zos-01.ll
+++ b/llvm/test/CodeGen/SystemZ/call-zos-01.ll
@@ -3,12 +3,12 @@
; RUN: llc < %s -mtriple=s390x-ibm-zos -mcpu=z10 | FileCheck %s
define i8 @call_char(){
-; CHECK-LABEL: call_char DS 0H
+; CHECK-LABEL: call_char DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: lg 6,8(5)
; CHECK-NEXT: lg 5,0(5)
; CHECK-NEXT: lghi 1,8
@@ -22,12 +22,12 @@ define i8 @call_char(){
}
define i16 @call_short() {
-; CHECK-LABEL: call_short DS 0H
+; CHECK-LABEL: call_short DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: lg 6,24(5)
; CHECK-NEXT: lg 5,16(5)
; CHECK-NEXT: lghi 1,16
@@ -42,12 +42,12 @@ entry:
}
define i32 @call_int() {
-; CHECK-LABEL: call_int DS 0H
+; CHECK-LABEL: call_int DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: lg 6,40(5)
; CHECK-NEXT: lg 5,32(5)
; CHECK-NEXT: lghi 1,32
@@ -63,12 +63,12 @@ entry:
}
define i64 @call_long() {
-; CHECK-LABEL: call_long DS 0H
+; CHECK-LABEL: call_long DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: lg 6,56(5)
; CHECK-NEXT: lg 5,48(5)
; CHECK-NEXT: lghi 1,64
@@ -85,12 +85,12 @@ entry:
}
define i32 @call_ptr(ptr %p1, ptr %p2) {
-; CHECK-LABEL: call_ptr DS 0H
+; CHECK-LABEL: call_ptr DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: lg 6,72(5)
; CHECK-NEXT: lg 5,64(5)
; CHECK-NEXT: lgr 1,2
@@ -105,12 +105,12 @@ entry:
}
define i64 @call_integrals() {
-; CHECK-LABEL: call_integrals DS 0H
+; CHECK-LABEL: call_integrals DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: lg 6,88(5)
; CHECK-NEXT: lg 5,80(5)
; CHECK-NEXT: lghi 1,64
@@ -128,7 +128,7 @@ entry:
}
define signext i8 @pass_char(i8 signext %arg) {
-; CHECK-LABEL: pass_char DS 0H
+; CHECK-LABEL: pass_char DS 0B
; CHECK: lgr 3,1
; CHECK-NEXT: b 2(7)
entry:
@@ -136,7 +136,7 @@ entry:
}
define signext i16 @pass_short(i16 signext %arg) {
-; CHECK-LABEL: pass_short DS 0H
+; CHECK-LABEL: pass_short DS 0B
; CHECK: lgr 3,1
; CHECK-NEXT: b 2(7)
entry:
@@ -144,7 +144,7 @@ entry:
}
define signext i32 @pass_int(i32 signext %arg0, i32 signext %arg1) {
-; CHECK-LABEL: pass_int DS 0H
+; CHECK-LABEL: pass_int DS 0B
; CHECK: lgr 3,2
; CHECK-NEXT: b 2(7)
entry:
@@ -152,7 +152,7 @@ entry:
}
define signext i64 @pass_long(i64 signext %arg0, i64 signext %arg1, i64 signext %arg2) {
-; CHECK-LABEL: pass_long DS 0H
+; CHECK-LABEL: pass_long DS 0B
; CHECK: agr 1,2
; CHECK-NEXT: agr 3,1
; CHECK-NEXT: b 2(7)
@@ -163,7 +163,7 @@ entry:
}
define signext i64 @pass_integrals0(i64 signext %arg0, i32 signext %arg1, i16 signext %arg2, i64 signext %arg3) {
-; CHECK-LABEL: pass_integrals0 DS 0H
+; CHECK-LABEL: pass_integrals0 DS 0B
; CHECK: ag 2,2200(4)
; CHECK-NEXT: lgr 3,2
; CHECK-NEXT: b 2(7)
@@ -174,12 +174,12 @@ entry:
}
define float @call_float() {
-; CHECK-LABEL: call_float DS 0H
+; CHECK-LABEL: call_float DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: lg 6,104(5)
; CHECK-NEXT: lg 5,96(5)
; CHECK-NEXT: larl 1,L#CPI11_0
@@ -195,12 +195,12 @@ entry:
}
define double @call_double() {
-; CHECK-LABEL: call_double DS 0H
+; CHECK-LABEL: call_double DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: lg 6,120(5)
; CHECK-NEXT: lg 5,112(5)
; CHECK-NEXT: larl 1,L#{{CPI[0-9]+_[0-9]+}}
@@ -216,12 +216,12 @@ entry:
}
define fp128 @call_longdouble() {
-; CHECK-LABEL: call_longdouble DS 0H
+; CHECK-LABEL: call_longdouble DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: lg 6,136(5)
; CHECK-NEXT: lg 5,128(5)
; CHECK-NEXT: larl 1,L#{{CPI[0-9]+_[0-9]+}}
@@ -238,12 +238,12 @@ entry:
}
define i64 @call_floats0(fp128 %arg0, double %arg1) {
-; CHECK-LABEL: call_floats0 DS 0H
+; CHECK-LABEL: call_floats0 DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: lg 6,152(5)
; CHECK-NEXT: lg 5,144(5)
; CHECK-NEXT: larl 1,L#{{CPI[0-9]+_[0-9]+}}
@@ -264,12 +264,12 @@ entry:
}
define i64 @call_floats1(fp128 %arg0, double %arg1) {
-; CHECK-LABEL: call_floats1 DS 0H
+; CHECK-LABEL: call_floats1 DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: lg 6,168(5)
; CHECK-NEXT: lg 5,160(5)
; CHECK-NEXT: lxr 1,0
@@ -286,7 +286,7 @@ entry:
}
define float @pass_float(float %arg) {
-; CHECK-LABEL: pass_float DS 0H
+; CHECK-LABEL: pass_float DS 0B
; CHECK: larl 1,L#{{CPI[0-9]+_[0-9]+}}
; CHECK-NEXT: aeb 0,0(1)
; CHECK-NEXT: b 2(7)
@@ -296,7 +296,7 @@ entry:
}
define double @pass_double(double %arg) {
-; CHECK-LABEL: pass_double DS 0H
+; CHECK-LABEL: pass_double DS 0B
; CHECK: larl 1,L#{{CPI[0-9]+_[0-9]+}}
; CHECK-NEXT: adb 0,0(1)
; CHECK-NEXT: b 2(7)
@@ -306,7 +306,7 @@ entry:
}
define fp128 @pass_longdouble(fp128 %arg) {
-; CHECK-LABEL: pass_longdouble DS 0H
+; CHECK-LABEL: pass_longdouble DS 0B
; CHECK: larl 1,L#{{CPI[0-9]+_[0-9]+}}
; CHECK-NEXT: lxdb 1,0(1)
; CHECK-NEXT: axbr 0,1
@@ -317,7 +317,7 @@ entry:
}
define i64 @pass_floats0(fp128 %arg0, fp128 %arg1, double %arg2) {
-; CHECK-LABEL: pass_floats0 DS 0H
+; CHECK-LABEL: pass_floats0 DS 0B
; CHECK: lxdb 1,2208(4)
; CHECK: larl 1,L#{{CPI[0-9]+_[0-9]+}}
; CHECK-NEXT: ld 5,0(1)
diff --git a/llvm/test/CodeGen/SystemZ/call-zos-02.ll b/llvm/test/CodeGen/SystemZ/call-zos-02.ll
index 7ddfda84ef4f6..ad9b7509136c0 100644
--- a/llvm/test/CodeGen/SystemZ/call-zos-02.ll
+++ b/llvm/test/CodeGen/SystemZ/call-zos-02.ll
@@ -8,7 +8,7 @@ entry:
define hidden signext i32 @caller2() {
entry:
-; CHECK-LABEL: caller2 DS 0H
+; CHECK-LABEL: caller2 DS 0B
; CHECK: * encoding: [0xc0,0x75,A,A,A,A]
; CHECK-NEXT: * fixup A - offset: 2, value: caller+2, kind: FK_390_PC32DBL
; CHECK-NEXT: brasl 7,caller
diff --git a/llvm/test/CodeGen/SystemZ/call-zos-i128.ll b/llvm/test/CodeGen/SystemZ/call-zos-i128.ll
index c12e26184f068..9cb5a16b66001 100644
--- a/llvm/test/CodeGen/SystemZ/call-zos-i128.ll
+++ b/llvm/test/CodeGen/SystemZ/call-zos-i128.ll
@@ -2,7 +2,7 @@
;
; RUN: llc < %s -mtriple=s390x-ibm-zos -mcpu=z13 | FileCheck %s
-; CHECK-LABEL: call_i128 DS 0H
+; CHECK-LABEL: call_i128 DS 0B
; CHECK-DAG: larl 1,L#CPI0_0
; CHECK-DAG: vl 0,0(1),3
; CHECK-DAG: vst 0,2256(4),3
@@ -19,7 +19,7 @@ entry:
ret i128 %retval
}
-; CHECK-LABEL: pass_i128 DS 0H
+; CHECK-LABEL: pass_i128 DS 0B
; CHECK: vl 0,0(3),3
; CHECK: vl 1,0(2),3
; CHECK: vaq 0,1,0
diff --git a/llvm/test/CodeGen/SystemZ/call-zos-vararg.ll b/llvm/test/CodeGen/SystemZ/call-zos-vararg.ll
index 3bcc583adec7f..1b66440f9a546 100644
--- a/llvm/test/CodeGen/SystemZ/call-zos-vararg.ll
+++ b/llvm/test/CodeGen/SystemZ/call-zos-vararg.ll
@@ -1,12 +1,12 @@
; Test passing variable argument lists in 64-bit calls on z/OS.
; RUN: llc < %s -mtriple=s390x-ibm-zos -mcpu=z10 | FileCheck %s
; RUN: llc < %s -mtriple=s390x-ibm-zos -mcpu=z14 | FileCheck %s -check-prefix=ARCH12
-; CHECK-LABEL: call_vararg_double0 DS 0H
+; CHECK-LABEL: call_vararg_double0 DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: lg 6,8(5)
; CHECK-NEXT: lg 5,0(5)
; CHECK-NEXT: llihf 3,1074118262
@@ -24,12 +24,12 @@ entry:
ret i64 %retval
}
-; CHECK-LABEL: call_vararg_double1 DS 0H
+; CHECK-LABEL: call_vararg_double1 DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: llihf 0,1074118262
; CHECK-NEXT: oilf 0,3367254360
; CHECK-NEXT: lg 6,8(5)
@@ -50,12 +50,12 @@ entry:
ret i64 %retval
}
-; CHECK-LABEL: call_vararg_double2 DS 0H
+; CHECK-LABEL: call_vararg_double2 DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: lg 6,24(5)
; CHECK-NEXT: lg 5,16(5)
; CHECK-NEXT: llihf 2,1074118262
@@ -72,12 +72,12 @@ entry:
ret i64 %retval
}
-; CHECK-LABEL: call_vararg_double3 DS 0H
+; CHECK-LABEL: call_vararg_double3 DS 0B
; CHECK: stmg 6,7,1872(4)
-; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#stack_update{{[0-9]+}} DS 0B
; CHECK-NEXT: aghi 4,-192
; CHECK-NEXT: *FENCE
-; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0H
+; CHECK-NEXT: L#end_of_prologue{{[0-9]+}} DS 0B
; CHECK-NEXT: llihf 0,1072703839
; CHECK-NEXT: oilf 0,2861204133
; CHECK-NEXT: lg 6,40(5)
@@ -101,12 +101,12 @@ entry:
}
;; TODO: The extra...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/222121
More information about the llvm-commits
mailing list