Skip to content

Commit 514686a

Browse files
authored
[RISCV] Add correct Uses, Defs, isReturn to Zcmp (#81039)
* they all do stack adjustments, so they all use and def x2. * popret and popretz also return * popretz also defines x10 This adds that to the TD file and updates the PushPopOptimizer to preserve the extra implicit operands added during frame lowering when converting to popret(z).
1 parent 50ffc53 commit 514686a

File tree

4 files changed

+210
-11
lines changed

4 files changed

+210
-11
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoZc.td

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,16 +190,19 @@ def CM_MVSA01 : RVInst16CA<0b101011, 0b01, 0b10, (outs SR07:$rs1, SR07:$rs2),
190190
} // DecoderNamespace = "RVZcmp", Predicates = [HasStdExtZcmp]...
191191

192192
let DecoderNamespace = "RVZcmp", Predicates = [HasStdExtZcmp] in {
193-
let hasSideEffects = 0, mayLoad = 0, mayStore = 1 in
193+
let hasSideEffects = 0, mayLoad = 0, mayStore = 1, Uses = [X2], Defs = [X2] in
194194
def CM_PUSH : RVInstZcCPPP<0b11000, "cm.push">;
195195

196-
let hasSideEffects = 0, mayLoad = 1, mayStore = 0 in
196+
let hasSideEffects = 0, mayLoad = 1, mayStore = 0, isReturn = 1,
197+
Uses = [X2], Defs = [X2] in
197198
def CM_POPRET : RVInstZcCPPP<0b11110, "cm.popret">;
198199

199-
let hasSideEffects = 0, mayLoad = 1, mayStore = 0 in
200+
let hasSideEffects = 0, mayLoad = 1, mayStore = 0, isReturn = 1,
201+
Uses = [X2], Defs = [X2, X10] in
200202
def CM_POPRETZ : RVInstZcCPPP<0b11100, "cm.popretz">;
201203

202-
let hasSideEffects = 0, mayLoad = 1, mayStore = 0 in
204+
let hasSideEffects = 0, mayLoad = 1, mayStore = 0,
205+
Uses = [X2], Defs = [X2] in
203206
def CM_POP : RVInstZcCPPP<0b11010, "cm.pop">;
204207
} // DecoderNamespace = "RVZcmp", Predicates = [HasStdExtZcmp]...
205208

llvm/lib/Target/RISCV/RISCVPushPopOptimizer.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,19 @@ bool RISCVPushPopOpt::usePopRet(MachineBasicBlock::iterator &MBBI,
6262
// this will detect all ret instruction.
6363
DebugLoc DL = NextI->getDebugLoc();
6464
unsigned Opc = IsReturnZero ? RISCV::CM_POPRETZ : RISCV::CM_POPRET;
65-
BuildMI(*NextI->getParent(), NextI, DL, TII->get(Opc))
66-
.add(MBBI->getOperand(0))
67-
.add(MBBI->getOperand(1));
65+
MachineInstrBuilder PopRetBuilder =
66+
BuildMI(*NextI->getParent(), NextI, DL, TII->get(Opc))
67+
.add(MBBI->getOperand(0))
68+
.add(MBBI->getOperand(1));
69+
70+
// Copy over the variable implicit uses and defs from the CM_POP. They depend
71+
// on what register list has been picked during frame lowering.
72+
const MCInstrDesc &PopDesc = MBBI->getDesc();
73+
unsigned FirstNonDeclaredOp = PopDesc.getNumOperands() +
74+
PopDesc.NumImplicitUses +
75+
PopDesc.NumImplicitDefs;
76+
for (unsigned i = FirstNonDeclaredOp; i < MBBI->getNumOperands(); ++i)
77+
PopRetBuilder.add(MBBI->getOperand(i));
6878

6979
MBBI->eraseFromParent();
7080
NextI->eraseFromParent();
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
2+
# RUN: llc -mtriple=riscv32 -mattr=+zcmp -x mir -start-before=prologepilog -stop-after=riscv-push-pop-opt -verify-machineinstrs -o - %s \
3+
# RUN: | FileCheck -check-prefixes=CHECK-ZCMP32 %s
4+
# RUN: llc -mtriple=riscv32 -mattr=+save-restore -x mir -start-before=prologepilog -stop-after=riscv-push-pop-opt -verify-machineinstrs -o - %s \
5+
# RUN: | FileCheck -check-prefixes=CHECK-LIBCALL32 %s
6+
# RUN: llc -mtriple=riscv64 -mattr=+zcmp -x mir -start-before=prologepilog -stop-after=riscv-push-pop-opt -verify-machineinstrs -o - %s \
7+
# RUN: | FileCheck -check-prefixes=CHECK-ZCMP64 %s
8+
# RUN: llc -mtriple=riscv64 -mattr=+save-restore -x mir -start-before=prologepilog -stop-after=riscv-push-pop-opt -verify-machineinstrs -o - %s \
9+
# RUN: | FileCheck -check-prefixes=CHECK-LIBCALL64 %s
10+
# RUN: llc -mtriple=riscv32 -x mir -start-before=prologepilog -stop-after=riscv-push-pop-opt -verify-machineinstrs -o - %s \
11+
# RUN: | FileCheck -check-prefixes=CHECK-NO-ZCMP32 %s
12+
# RUN: llc -mtriple=riscv64 -x mir -start-before=prologepilog -stop-after=riscv-push-pop-opt -verify-machineinstrs -o - %s \
13+
# RUN: | FileCheck -check-prefixes=CHECK-NO-ZCMP64 %s
14+
---
15+
name: popret_rvlist5
16+
tracksRegLiveness: true
17+
body: |
18+
bb.0:
19+
; CHECK-ZCMP32-LABEL: name: popret_rvlist5
20+
; CHECK-ZCMP32: liveins: $x1, $x8
21+
; CHECK-ZCMP32-NEXT: {{ $}}
22+
; CHECK-ZCMP32-NEXT: frame-setup CM_PUSH 5, 0, implicit-def $x2, implicit $x2, implicit $x1, implicit $x8
23+
; CHECK-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
24+
; CHECK-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
25+
; CHECK-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -4
26+
; CHECK-ZCMP32-NEXT: $x1 = IMPLICIT_DEF
27+
; CHECK-ZCMP32-NEXT: $x8 = IMPLICIT_DEF
28+
; CHECK-ZCMP32-NEXT: CM_POPRET 5, 0, implicit-def $x2, implicit $x2, implicit-def $x1, implicit-def $x8
29+
;
30+
; CHECK-LIBCALL32-LABEL: name: popret_rvlist5
31+
; CHECK-LIBCALL32: liveins: $x1, $x8
32+
; CHECK-LIBCALL32-NEXT: {{ $}}
33+
; CHECK-LIBCALL32-NEXT: $x5 = frame-setup PseudoCALLReg target-flags(riscv-call) &__riscv_save_1
34+
; CHECK-LIBCALL32-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
35+
; CHECK-LIBCALL32-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
36+
; CHECK-LIBCALL32-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -8
37+
; CHECK-LIBCALL32-NEXT: $x1 = IMPLICIT_DEF
38+
; CHECK-LIBCALL32-NEXT: $x8 = IMPLICIT_DEF
39+
; CHECK-LIBCALL32-NEXT: frame-destroy PseudoTAIL target-flags(riscv-call) &__riscv_restore_1, implicit $x2
40+
;
41+
; CHECK-ZCMP64-LABEL: name: popret_rvlist5
42+
; CHECK-ZCMP64: liveins: $x1, $x8
43+
; CHECK-ZCMP64-NEXT: {{ $}}
44+
; CHECK-ZCMP64-NEXT: frame-setup CM_PUSH 5, 0, implicit-def $x2, implicit $x2, implicit $x1, implicit $x8
45+
; CHECK-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
46+
; CHECK-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -16
47+
; CHECK-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -8
48+
; CHECK-ZCMP64-NEXT: $x1 = IMPLICIT_DEF
49+
; CHECK-ZCMP64-NEXT: $x8 = IMPLICIT_DEF
50+
; CHECK-ZCMP64-NEXT: CM_POPRET 5, 0, implicit-def $x2, implicit $x2, implicit-def $x1, implicit-def $x8
51+
;
52+
; CHECK-LIBCALL64-LABEL: name: popret_rvlist5
53+
; CHECK-LIBCALL64: liveins: $x1, $x8
54+
; CHECK-LIBCALL64-NEXT: {{ $}}
55+
; CHECK-LIBCALL64-NEXT: $x5 = frame-setup PseudoCALLReg target-flags(riscv-call) &__riscv_save_1
56+
; CHECK-LIBCALL64-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
57+
; CHECK-LIBCALL64-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
58+
; CHECK-LIBCALL64-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -16
59+
; CHECK-LIBCALL64-NEXT: $x1 = IMPLICIT_DEF
60+
; CHECK-LIBCALL64-NEXT: $x8 = IMPLICIT_DEF
61+
; CHECK-LIBCALL64-NEXT: frame-destroy PseudoTAIL target-flags(riscv-call) &__riscv_restore_1, implicit $x2
62+
;
63+
; CHECK-NO-ZCMP32-LABEL: name: popret_rvlist5
64+
; CHECK-NO-ZCMP32: liveins: $x1, $x8
65+
; CHECK-NO-ZCMP32-NEXT: {{ $}}
66+
; CHECK-NO-ZCMP32-NEXT: $x2 = frame-setup ADDI $x2, -16
67+
; CHECK-NO-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
68+
; CHECK-NO-ZCMP32-NEXT: SW killed $x1, $x2, 12 :: (store (s32) into %stack.0)
69+
; CHECK-NO-ZCMP32-NEXT: SW killed $x8, $x2, 8 :: (store (s32) into %stack.1)
70+
; CHECK-NO-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
71+
; CHECK-NO-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -8
72+
; CHECK-NO-ZCMP32-NEXT: $x1 = IMPLICIT_DEF
73+
; CHECK-NO-ZCMP32-NEXT: $x8 = IMPLICIT_DEF
74+
; CHECK-NO-ZCMP32-NEXT: $x1 = LW $x2, 12 :: (load (s32) from %stack.0)
75+
; CHECK-NO-ZCMP32-NEXT: $x8 = LW $x2, 8 :: (load (s32) from %stack.1)
76+
; CHECK-NO-ZCMP32-NEXT: $x2 = frame-destroy ADDI $x2, 16
77+
; CHECK-NO-ZCMP32-NEXT: PseudoRET
78+
;
79+
; CHECK-NO-ZCMP64-LABEL: name: popret_rvlist5
80+
; CHECK-NO-ZCMP64: liveins: $x1, $x8
81+
; CHECK-NO-ZCMP64-NEXT: {{ $}}
82+
; CHECK-NO-ZCMP64-NEXT: $x2 = frame-setup ADDI $x2, -16
83+
; CHECK-NO-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
84+
; CHECK-NO-ZCMP64-NEXT: SD killed $x1, $x2, 8 :: (store (s64) into %stack.0)
85+
; CHECK-NO-ZCMP64-NEXT: SD killed $x8, $x2, 0 :: (store (s64) into %stack.1)
86+
; CHECK-NO-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
87+
; CHECK-NO-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -16
88+
; CHECK-NO-ZCMP64-NEXT: $x1 = IMPLICIT_DEF
89+
; CHECK-NO-ZCMP64-NEXT: $x8 = IMPLICIT_DEF
90+
; CHECK-NO-ZCMP64-NEXT: $x1 = LD $x2, 8 :: (load (s64) from %stack.0)
91+
; CHECK-NO-ZCMP64-NEXT: $x8 = LD $x2, 0 :: (load (s64) from %stack.1)
92+
; CHECK-NO-ZCMP64-NEXT: $x2 = frame-destroy ADDI $x2, 16
93+
; CHECK-NO-ZCMP64-NEXT: PseudoRET
94+
$x1 = IMPLICIT_DEF
95+
$x8 = IMPLICIT_DEF
96+
PseudoRET
97+
...
98+
---
99+
name: popretz_rvlist5
100+
tracksRegLiveness: true
101+
body: |
102+
bb.0:
103+
; CHECK-ZCMP32-LABEL: name: popretz_rvlist5
104+
; CHECK-ZCMP32: liveins: $x1, $x8
105+
; CHECK-ZCMP32-NEXT: {{ $}}
106+
; CHECK-ZCMP32-NEXT: frame-setup CM_PUSH 5, 0, implicit-def $x2, implicit $x2, implicit $x1, implicit $x8
107+
; CHECK-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
108+
; CHECK-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
109+
; CHECK-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -4
110+
; CHECK-ZCMP32-NEXT: $x1 = IMPLICIT_DEF
111+
; CHECK-ZCMP32-NEXT: $x8 = IMPLICIT_DEF
112+
; CHECK-ZCMP32-NEXT: CM_POPRETZ 5, 0, implicit-def $x2, implicit-def $x10, implicit $x2, implicit-def $x1, implicit-def $x8
113+
;
114+
; CHECK-LIBCALL32-LABEL: name: popretz_rvlist5
115+
; CHECK-LIBCALL32: liveins: $x1, $x8
116+
; CHECK-LIBCALL32-NEXT: {{ $}}
117+
; CHECK-LIBCALL32-NEXT: $x5 = frame-setup PseudoCALLReg target-flags(riscv-call) &__riscv_save_1
118+
; CHECK-LIBCALL32-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
119+
; CHECK-LIBCALL32-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
120+
; CHECK-LIBCALL32-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -8
121+
; CHECK-LIBCALL32-NEXT: $x1 = IMPLICIT_DEF
122+
; CHECK-LIBCALL32-NEXT: $x8 = IMPLICIT_DEF
123+
; CHECK-LIBCALL32-NEXT: $x10 = ADDI $x0, 0
124+
; CHECK-LIBCALL32-NEXT: frame-destroy PseudoTAIL target-flags(riscv-call) &__riscv_restore_1, implicit $x2, implicit $x10
125+
;
126+
; CHECK-ZCMP64-LABEL: name: popretz_rvlist5
127+
; CHECK-ZCMP64: liveins: $x1, $x8
128+
; CHECK-ZCMP64-NEXT: {{ $}}
129+
; CHECK-ZCMP64-NEXT: frame-setup CM_PUSH 5, 0, implicit-def $x2, implicit $x2, implicit $x1, implicit $x8
130+
; CHECK-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
131+
; CHECK-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -16
132+
; CHECK-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -8
133+
; CHECK-ZCMP64-NEXT: $x1 = IMPLICIT_DEF
134+
; CHECK-ZCMP64-NEXT: $x8 = IMPLICIT_DEF
135+
; CHECK-ZCMP64-NEXT: CM_POPRETZ 5, 0, implicit-def $x2, implicit-def $x10, implicit $x2, implicit-def $x1, implicit-def $x8
136+
;
137+
; CHECK-LIBCALL64-LABEL: name: popretz_rvlist5
138+
; CHECK-LIBCALL64: liveins: $x1, $x8
139+
; CHECK-LIBCALL64-NEXT: {{ $}}
140+
; CHECK-LIBCALL64-NEXT: $x5 = frame-setup PseudoCALLReg target-flags(riscv-call) &__riscv_save_1
141+
; CHECK-LIBCALL64-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
142+
; CHECK-LIBCALL64-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
143+
; CHECK-LIBCALL64-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -16
144+
; CHECK-LIBCALL64-NEXT: $x1 = IMPLICIT_DEF
145+
; CHECK-LIBCALL64-NEXT: $x8 = IMPLICIT_DEF
146+
; CHECK-LIBCALL64-NEXT: $x10 = ADDI $x0, 0
147+
; CHECK-LIBCALL64-NEXT: frame-destroy PseudoTAIL target-flags(riscv-call) &__riscv_restore_1, implicit $x2, implicit $x10
148+
;
149+
; CHECK-NO-ZCMP32-LABEL: name: popretz_rvlist5
150+
; CHECK-NO-ZCMP32: liveins: $x1, $x8
151+
; CHECK-NO-ZCMP32-NEXT: {{ $}}
152+
; CHECK-NO-ZCMP32-NEXT: $x2 = frame-setup ADDI $x2, -16
153+
; CHECK-NO-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
154+
; CHECK-NO-ZCMP32-NEXT: SW killed $x1, $x2, 12 :: (store (s32) into %stack.0)
155+
; CHECK-NO-ZCMP32-NEXT: SW killed $x8, $x2, 8 :: (store (s32) into %stack.1)
156+
; CHECK-NO-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
157+
; CHECK-NO-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -8
158+
; CHECK-NO-ZCMP32-NEXT: $x1 = IMPLICIT_DEF
159+
; CHECK-NO-ZCMP32-NEXT: $x8 = IMPLICIT_DEF
160+
; CHECK-NO-ZCMP32-NEXT: $x10 = ADDI $x0, 0
161+
; CHECK-NO-ZCMP32-NEXT: $x1 = LW $x2, 12 :: (load (s32) from %stack.0)
162+
; CHECK-NO-ZCMP32-NEXT: $x8 = LW $x2, 8 :: (load (s32) from %stack.1)
163+
; CHECK-NO-ZCMP32-NEXT: $x2 = frame-destroy ADDI $x2, 16
164+
; CHECK-NO-ZCMP32-NEXT: PseudoRET implicit $x10
165+
;
166+
; CHECK-NO-ZCMP64-LABEL: name: popretz_rvlist5
167+
; CHECK-NO-ZCMP64: liveins: $x1, $x8
168+
; CHECK-NO-ZCMP64-NEXT: {{ $}}
169+
; CHECK-NO-ZCMP64-NEXT: $x2 = frame-setup ADDI $x2, -16
170+
; CHECK-NO-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 16
171+
; CHECK-NO-ZCMP64-NEXT: SD killed $x1, $x2, 8 :: (store (s64) into %stack.0)
172+
; CHECK-NO-ZCMP64-NEXT: SD killed $x8, $x2, 0 :: (store (s64) into %stack.1)
173+
; CHECK-NO-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
174+
; CHECK-NO-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -16
175+
; CHECK-NO-ZCMP64-NEXT: $x1 = IMPLICIT_DEF
176+
; CHECK-NO-ZCMP64-NEXT: $x8 = IMPLICIT_DEF
177+
; CHECK-NO-ZCMP64-NEXT: $x10 = ADDI $x0, 0
178+
; CHECK-NO-ZCMP64-NEXT: $x1 = LD $x2, 8 :: (load (s64) from %stack.0)
179+
; CHECK-NO-ZCMP64-NEXT: $x8 = LD $x2, 0 :: (load (s64) from %stack.1)
180+
; CHECK-NO-ZCMP64-NEXT: $x2 = frame-destroy ADDI $x2, 16
181+
; CHECK-NO-ZCMP64-NEXT: PseudoRET implicit $x10
182+
$x1 = IMPLICIT_DEF
183+
$x8 = IMPLICIT_DEF
184+
$x10 = COPY $x0
185+
PseudoRET implicit $x10
186+
...

llvm/test/CodeGen/RISCV/zcmp-cm-push-pop.mir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ body: |
1919
; CHECK-ZCMP32-LABEL: name: push_rvlist15
2020
; CHECK-ZCMP32: liveins: $x1, $x8, $x9, $x18, $x19, $x20, $x21, $x22, $x23, $x24, $x25, $x26, $x27
2121
; CHECK-ZCMP32-NEXT: {{ $}}
22-
; CHECK-ZCMP32-NEXT: frame-setup CM_PUSH 15, 0, implicit $x1, implicit $x8, implicit $x9, implicit $x18, implicit $x19, implicit $x20, implicit $x21, implicit $x22, implicit $x23, implicit $x24, implicit $x25, implicit $x26, implicit $x27
22+
; CHECK-ZCMP32-NEXT: frame-setup CM_PUSH 15, 0, implicit-def $x2, implicit $x2, implicit $x1, implicit $x8, implicit $x9, implicit $x18, implicit $x19, implicit $x20, implicit $x21, implicit $x22, implicit $x23, implicit $x24, implicit $x25, implicit $x26, implicit $x27
2323
; CHECK-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 64
2424
; CHECK-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -52
2525
; CHECK-ZCMP32-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -48
@@ -47,7 +47,7 @@ body: |
4747
; CHECK-ZCMP32-NEXT: $x25 = IMPLICIT_DEF
4848
; CHECK-ZCMP32-NEXT: $x26 = IMPLICIT_DEF
4949
; CHECK-ZCMP32-NEXT: $x27 = IMPLICIT_DEF
50-
; CHECK-ZCMP32-NEXT: frame-destroy CM_POP 15, 0, implicit-def $x1, implicit-def $x8, implicit-def $x9, implicit-def $x18, implicit-def $x19, implicit-def $x20, implicit-def $x21, implicit-def $x22, implicit-def $x23, implicit-def $x24, implicit-def $x25, implicit-def $x26, implicit-def $x27
50+
; CHECK-ZCMP32-NEXT: frame-destroy CM_POP 15, 0, implicit-def $x2, implicit $x2, implicit-def $x1, implicit-def $x8, implicit-def $x9, implicit-def $x18, implicit-def $x19, implicit-def $x20, implicit-def $x21, implicit-def $x22, implicit-def $x23, implicit-def $x24, implicit-def $x25, implicit-def $x26, implicit-def $x27
5151
; CHECK-ZCMP32-NEXT: PseudoRET
5252
;
5353
; CHECK-LIBCALL32-LABEL: name: push_rvlist15
@@ -86,7 +86,7 @@ body: |
8686
; CHECK-ZCMP64-LABEL: name: push_rvlist15
8787
; CHECK-ZCMP64: liveins: $x1, $x8, $x9, $x18, $x19, $x20, $x21, $x22, $x23, $x24, $x25, $x26, $x27
8888
; CHECK-ZCMP64-NEXT: {{ $}}
89-
; CHECK-ZCMP64-NEXT: frame-setup CM_PUSH 15, 0, implicit $x1, implicit $x8, implicit $x9, implicit $x18, implicit $x19, implicit $x20, implicit $x21, implicit $x22, implicit $x23, implicit $x24, implicit $x25, implicit $x26, implicit $x27
89+
; CHECK-ZCMP64-NEXT: frame-setup CM_PUSH 15, 0, implicit-def $x2, implicit $x2, implicit $x1, implicit $x8, implicit $x9, implicit $x18, implicit $x19, implicit $x20, implicit $x21, implicit $x22, implicit $x23, implicit $x24, implicit $x25, implicit $x26, implicit $x27
9090
; CHECK-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 112
9191
; CHECK-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -104
9292
; CHECK-ZCMP64-NEXT: frame-setup CFI_INSTRUCTION offset $x8, -96
@@ -114,7 +114,7 @@ body: |
114114
; CHECK-ZCMP64-NEXT: $x25 = IMPLICIT_DEF
115115
; CHECK-ZCMP64-NEXT: $x26 = IMPLICIT_DEF
116116
; CHECK-ZCMP64-NEXT: $x27 = IMPLICIT_DEF
117-
; CHECK-ZCMP64-NEXT: frame-destroy CM_POP 15, 0, implicit-def $x1, implicit-def $x8, implicit-def $x9, implicit-def $x18, implicit-def $x19, implicit-def $x20, implicit-def $x21, implicit-def $x22, implicit-def $x23, implicit-def $x24, implicit-def $x25, implicit-def $x26, implicit-def $x27
117+
; CHECK-ZCMP64-NEXT: frame-destroy CM_POP 15, 0, implicit-def $x2, implicit $x2, implicit-def $x1, implicit-def $x8, implicit-def $x9, implicit-def $x18, implicit-def $x19, implicit-def $x20, implicit-def $x21, implicit-def $x22, implicit-def $x23, implicit-def $x24, implicit-def $x25, implicit-def $x26, implicit-def $x27
118118
; CHECK-ZCMP64-NEXT: PseudoRET
119119
;
120120
; CHECK-LIBCALL64-LABEL: name: push_rvlist15

0 commit comments

Comments
 (0)