Skip to content

Commit 770d4c6

Browse files
[AArch64][DebugInfo]Add Target hooks for InstrRef on AArch64
According to llvm/docs/InstrRefDebugInfo.md, to support proper instruction referecing on any platform, the target specific `TargetInstrInfo::isLoadFromStackSlotPostFE` and `TargetInstrInfo::isStoreToStackSlotPostFE` functions are needed to be implemented for the Instruction Reference-based LiveDebugValues pass to identify spill and restore instructions. This patch is attempting to reland llvm#162327
1 parent e876540 commit 770d4c6

File tree

4 files changed

+371
-11
lines changed

4 files changed

+371
-11
lines changed

llvm/lib/Target/AArch64/AArch64InstrInfo.cpp

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2392,11 +2392,10 @@ bool AArch64InstrInfo::isFPRCopy(const MachineInstr &MI) {
23922392
return false;
23932393
}
23942394

2395-
Register AArch64InstrInfo::isLoadFromStackSlot(const MachineInstr &MI,
2396-
int &FrameIndex) const {
2397-
switch (MI.getOpcode()) {
2395+
static bool isFrameLoadOpcode(int Opcode) {
2396+
switch (Opcode) {
23982397
default:
2399-
break;
2398+
return false;
24002399
case AArch64::LDRWui:
24012400
case AArch64::LDRXui:
24022401
case AArch64::LDRBui:
@@ -2405,22 +2404,26 @@ Register AArch64InstrInfo::isLoadFromStackSlot(const MachineInstr &MI,
24052404
case AArch64::LDRDui:
24062405
case AArch64::LDRQui:
24072406
case AArch64::LDR_PXI:
2407+
return true;
2408+
}
2409+
}
2410+
2411+
Register AArch64InstrInfo::isLoadFromStackSlot(const MachineInstr &MI,
2412+
int &FrameIndex) const {
2413+
if (isFrameLoadOpcode(MI.getOpcode())) {
24082414
if (MI.getOperand(0).getSubReg() == 0 && MI.getOperand(1).isFI() &&
24092415
MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0) {
24102416
FrameIndex = MI.getOperand(1).getIndex();
24112417
return MI.getOperand(0).getReg();
24122418
}
2413-
break;
24142419
}
2415-
24162420
return 0;
24172421
}
24182422

2419-
Register AArch64InstrInfo::isStoreToStackSlot(const MachineInstr &MI,
2420-
int &FrameIndex) const {
2421-
switch (MI.getOpcode()) {
2423+
static bool isFrameStoreOpcode(int Opcode) {
2424+
switch (Opcode) {
24222425
default:
2423-
break;
2426+
return false;
24242427
case AArch64::STRWui:
24252428
case AArch64::STRXui:
24262429
case AArch64::STRBui:
@@ -2429,16 +2432,55 @@ Register AArch64InstrInfo::isStoreToStackSlot(const MachineInstr &MI,
24292432
case AArch64::STRDui:
24302433
case AArch64::STRQui:
24312434
case AArch64::STR_PXI:
2435+
return true;
2436+
}
2437+
}
2438+
2439+
Register AArch64InstrInfo::isStoreToStackSlot(const MachineInstr &MI,
2440+
int &FrameIndex) const {
2441+
if (isFrameStoreOpcode(MI.getOpcode())) {
24322442
if (MI.getOperand(0).getSubReg() == 0 && MI.getOperand(1).isFI() &&
24332443
MI.getOperand(2).isImm() && MI.getOperand(2).getImm() == 0) {
24342444
FrameIndex = MI.getOperand(1).getIndex();
24352445
return MI.getOperand(0).getReg();
24362446
}
2437-
break;
24382447
}
24392448
return 0;
24402449
}
24412450

2451+
Register AArch64InstrInfo::isStoreToStackSlotPostFE(const MachineInstr &MI,
2452+
int &FrameIndex) const {
2453+
if (isFrameStoreOpcode(MI.getOpcode())) {
2454+
SmallVector<const MachineMemOperand *, 1> Accesses;
2455+
if (Register Reg = isStoreToStackSlot(MI, FrameIndex))
2456+
return Reg;
2457+
2458+
if (hasStoreToStackSlot(MI, Accesses)) {
2459+
FrameIndex =
2460+
cast<FixedStackPseudoSourceValue>(Accesses.front()->getPseudoValue())
2461+
->getFrameIndex();
2462+
return MI.getOperand(0).getReg();
2463+
}
2464+
}
2465+
return Register();
2466+
}
2467+
2468+
Register AArch64InstrInfo::isLoadFromStackSlotPostFE(const MachineInstr &MI,
2469+
int &FrameIndex) const {
2470+
if (isFrameLoadOpcode(MI.getOpcode())) {
2471+
if (Register Reg = isLoadFromStackSlot(MI, FrameIndex))
2472+
return Reg;
2473+
SmallVector<const MachineMemOperand *, 1> Accesses;
2474+
if (hasLoadFromStackSlot(MI, Accesses)) {
2475+
FrameIndex =
2476+
cast<FixedStackPseudoSourceValue>(Accesses.front()->getPseudoValue())
2477+
->getFrameIndex();
2478+
return MI.getOperand(0).getReg();
2479+
}
2480+
}
2481+
return Register();
2482+
}
2483+
24422484
/// Check all MachineMemOperands for a hint to suppress pairing.
24432485
bool AArch64InstrInfo::isLdStPairSuppressed(const MachineInstr &MI) {
24442486
return llvm::any_of(MI.memoperands(), [](MachineMemOperand *MMO) {

llvm/lib/Target/AArch64/AArch64InstrInfo.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,15 @@ class AArch64InstrInfo final : public AArch64GenInstrInfo {
205205
Register isStoreToStackSlot(const MachineInstr &MI,
206206
int &FrameIndex) const override;
207207

208+
/// isStoreToStackSlotPostFE - Check for post-frame ptr elimination
209+
/// stack locations as well. This uses a heuristic so it isn't
210+
/// reliable for correctness.
211+
Register isStoreToStackSlotPostFE(const MachineInstr &MI,
212+
int &FrameIndex) const override;
213+
214+
Register isLoadFromStackSlotPostFE(const MachineInstr &MI,
215+
int &FrameIndex) const override;
216+
208217
/// Does this instruction set its full destination register to zero?
209218
static bool isGPRZero(const MachineInstr &MI);
210219

Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
# Test to ensure that variable "__last" is properly recovered at the end of the livedebugvalues pass when Instruction Referencing-based LiveDebugValues is used.
2+
# This testcase was obtained by looking at FileCheck.cpp and reducing it down via llvm-reduce.
3+
# This test is the same as llvm/test/DebugInfo/AArch64/instr-ref-target-hooks.ll, however, the output is taken just before the livedebugvalues pass, and then a clobber
4+
# to the stack slot has been added on line 238, the livedebugvalues pass should still recover the value, as it was loaded into $x8 before the clobber.
5+
6+
# RUN: llc -o - %s -run-pass=livedebugvalues | FileCheck %s
7+
8+
# CHECK: ![[LOC:[0-9]+]] = !DILocalVariable(name: "__last",
9+
# CHECK: DBG_VALUE_LIST ![[LOC]], !DIExpression(DW_OP_LLVM_arg, 0), $x8
10+
11+
12+
--- |
13+
; ModuleID = '/Users/srastogi/Development/llvm-project/llvm/test/DebugInfo/AArch64/instr-ref-target-hooks.ll'
14+
source_filename = "/Users/srastogi/Development/llvm-project/llvm/test/DebugInfo/AArch64/instr-ref-target-hooks.ll"
15+
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32"
16+
target triple = "aarch64-apple-darwin"
17+
18+
declare void @_ZdlPvm()
19+
20+
define fastcc void @"_ZNSt3__111__introsortINS_17_ClassicAlgPolicyERZL18DumpAnnotatedInputRN4llvm11raw_ostreamERKNS2_16FileCheckRequestE20DumpInputFilterValuejNS2_9StringRefERNS_6vectorI15InputAnnotationNS_9allocatorISB_EEEEjE3$_0PSB_Lb0EEEvT1_SJ_T0_NS_15iterator_traitsISJ_E15difference_typeEb"(ptr %__first, ptr %__last, i1 %cmp, ptr %__first.addr.0, ptr %Label3.i.i.i241, ptr %__pivot.sroa.9113.8.copyload.i, ptr %0, ptr %1) !dbg !4 {
21+
br label %while.cond
22+
23+
while.cond: ; preds = %if.end16, %2
24+
br i1 %cmp, label %if.then13, label %if.end16
25+
26+
if.then13: ; preds = %while.cond
27+
%cmp.i = icmp eq ptr %__first, %__last
28+
%or.cond.i = select i1 %cmp.i, i1 false, i1 false
29+
#dbg_value(ptr %__last, !10, !DIExpression(), !16)
30+
br i1 %or.cond.i, label %common.ret, label %for.body.i, !dbg !23
31+
32+
common.ret: ; preds = %for.body.i, %if.then13
33+
ret void
34+
35+
for.body.i: ; preds = %if.then13
36+
%InputLine.i.i = getelementptr i8, ptr %__first.addr.0, i64 132
37+
br label %common.ret
38+
39+
if.end16: ; preds = %while.cond
40+
%__pivot.sroa.13.8.copyload.i = load i64, ptr null, align 8
41+
call void @_ZdlPvm()
42+
store ptr %__pivot.sroa.9113.8.copyload.i, ptr %0, align 8
43+
store i64 %__pivot.sroa.13.8.copyload.i, ptr %1, align 8
44+
store i64 0, ptr %__first, align 8
45+
store i32 0, ptr %__first.addr.0, align 8
46+
store i32 1, ptr %Label3.i.i.i241, align 4
47+
br label %while.cond
48+
}
49+
50+
!llvm.module.flags = !{!0}
51+
!llvm.dbg.cu = !{!1}
52+
53+
!0 = !{i32 2, !"Debug Info Version", i32 3}
54+
!1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !2, producer: "clang version 22.0.0git ([email protected]:llvm/llvm-project.git 46a3b4d5dc6dd9449ec7c0c9065552368cdf41d6)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, retainedTypes: !3, globals: !3, imports: !3, splitDebugInlining: false, nameTableKind: Apple, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX15.3.sdk", sdk: "MacOSX15.3.sdk")
55+
!2 = !DIFile(filename: "/Users/shubhamrastogi/Development/llvm-project-instr-ref/llvm-project/llvm/utils/FileCheck/FileCheck.cpp", directory: "/Users/shubhamrastogi/Development/llvm-project-instr-ref/llvm-project/build-instr-ref-stage2", checksumkind: CSK_MD5, checksum: "fa5f53f1b5782eb8b92fadec416b8941")
56+
!3 = !{}
57+
!4 = distinct !DISubprogram(name: "__introsort<std::__1::_ClassicAlgPolicy, (lambda at /Users/shubhamrastogi/Development/llvm-project-instr-ref/llvm-project/llvm/utils/FileCheck/FileCheck.cpp:544:14) &, InputAnnotation *, false>", linkageName: "_ZNSt3__111__introsortINS_17_ClassicAlgPolicyERZL18DumpAnnotatedInputRN4llvm11raw_ostreamERKNS2_16FileCheckRequestE20DumpInputFilterValuejNS2_9StringRefERNS_6vectorI15InputAnnotationNS_9allocatorISB_EEEEjE3$_0PSB_Lb0EEEvT1_SJ_T0_NS_15iterator_traitsISJ_E15difference_typeEb", scope: !6, file: !5, line: 758, type: !8, scopeLine: 762, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !1, templateParams: !3, retainedNodes: !3, keyInstructions: true)
58+
!5 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX15.3.sdk/usr/include/c++/v1/__algorithm/sort.h", directory: "")
59+
!6 = !DINamespace(name: "__1", scope: !7, exportSymbols: true)
60+
!7 = !DINamespace(name: "std", scope: null)
61+
!8 = !DISubroutineType(cc: DW_CC_nocall, types: !9)
62+
!9 = !{null}
63+
!10 = !DILocalVariable(name: "__last", arg: 2, scope: !11, file: !5, line: 284, type: !13)
64+
!11 = distinct !DISubprogram(name: "__insertion_sort<std::__1::_ClassicAlgPolicy, (lambda at /Users/shubhamrastogi/Development/llvm-project-instr-ref/llvm-project/llvm/utils/FileCheck/FileCheck.cpp:544:14) &, InputAnnotation *>", linkageName: "_ZNSt3__116__insertion_sortB8nn180100INS_17_ClassicAlgPolicyERZL18DumpAnnotatedInputRN4llvm11raw_ostreamERKNS2_16FileCheckRequestE20DumpInputFilterValuejNS2_9StringRefERNS_6vectorI15InputAnnotationNS_9allocatorISB_EEEEjE3$_0PSB_EEvT1_SJ_T0_", scope: !6, file: !5, line: 284, type: !12, scopeLine: 284, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !1, templateParams: !3, retainedNodes: !3, keyInstructions: true)
65+
!12 = distinct !DISubroutineType(types: !9)
66+
!13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !14, size: 64)
67+
!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "InputAnnotation", file: !15, line: 323, size: 768, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !3, identifier: "_ZTS15InputAnnotation")
68+
!15 = !DIFile(filename: "llvm/utils/FileCheck/FileCheck.cpp", directory: "/Users/shubhamrastogi/Development/llvm-project-instr-ref/llvm-project", checksumkind: CSK_MD5, checksum: "fa5f53f1b5782eb8b92fadec416b8941")
69+
!16 = !DILocation(line: 0, scope: !11, inlinedAt: !17)
70+
!17 = distinct !DILocation(line: 800, column: 9, scope: !18)
71+
!18 = distinct !DILexicalBlock(scope: !19, file: !5, line: 799, column: 23)
72+
!19 = distinct !DILexicalBlock(scope: !20, file: !5, line: 799, column: 11)
73+
!20 = distinct !DILexicalBlock(scope: !21, file: !5, line: 798, column: 26)
74+
!21 = distinct !DILexicalBlock(scope: !22, file: !5, line: 798, column: 9)
75+
!22 = distinct !DILexicalBlock(scope: !4, file: !5, line: 770, column: 16)
76+
!23 = !DILocation(line: 288, column: 15, scope: !24, inlinedAt: !17, atomGroup: 1, atomRank: 1)
77+
!24 = distinct !DILexicalBlock(scope: !11, file: !5, line: 288, column: 7)
78+
...
79+
---
80+
name: '_ZNSt3__111__introsortINS_17_ClassicAlgPolicyERZL18DumpAnnotatedInputRN4llvm11raw_ostreamERKNS2_16FileCheckRequestE20DumpInputFilterValuejNS2_9StringRefERNS_6vectorI15InputAnnotationNS_9allocatorISB_EEEEjE3$_0PSB_Lb0EEEvT1_SJ_T0_NS_15iterator_traitsISJ_E15difference_typeEb'
81+
alignment: 4
82+
exposesReturnsTwice: false
83+
legalized: false
84+
regBankSelected: false
85+
selected: false
86+
failedISel: false
87+
tracksRegLiveness: true
88+
hasWinCFI: false
89+
noPhis: true
90+
isSSA: false
91+
noVRegs: true
92+
hasFakeUses: false
93+
callsEHReturn: false
94+
callsUnwindInit: false
95+
hasEHContTarget: false
96+
hasEHScopes: false
97+
hasEHFunclets: false
98+
isOutlined: false
99+
debugInstrRef: true
100+
failsVerification: false
101+
tracksDebugUserValues: true
102+
registers: []
103+
liveins:
104+
- { reg: '$x0', virtual-reg: '' }
105+
- { reg: '$x1', virtual-reg: '' }
106+
- { reg: '$w2', virtual-reg: '' }
107+
- { reg: '$x3', virtual-reg: '' }
108+
- { reg: '$x4', virtual-reg: '' }
109+
- { reg: '$x5', virtual-reg: '' }
110+
- { reg: '$x6', virtual-reg: '' }
111+
- { reg: '$x7', virtual-reg: '' }
112+
frameInfo:
113+
isFrameAddressTaken: false
114+
isReturnAddressTaken: false
115+
hasStackMap: false
116+
hasPatchPoint: false
117+
stackSize: 112
118+
offsetAdjustment: 0
119+
maxAlignment: 8
120+
adjustsStack: true
121+
hasCalls: true
122+
stackProtector: ''
123+
functionContext: ''
124+
maxCallFrameSize: 0
125+
cvBytesOfCalleeSavedRegisters: 0
126+
hasOpaqueSPAdjustment: false
127+
hasVAStart: false
128+
hasMustTailInVarArgFunc: false
129+
hasTailCall: false
130+
isCalleeSavedInfoValid: true
131+
localFrameSize: 0
132+
fixedStack: []
133+
stack:
134+
- { id: 0, name: '', type: spill-slot, offset: -104, size: 8, alignment: 8,
135+
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
136+
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
137+
- { id: 1, name: '', type: spill-slot, offset: -8, size: 8, alignment: 8,
138+
stack-id: default, callee-saved-register: '$lr', callee-saved-restored: true,
139+
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
140+
- { id: 2, name: '', type: spill-slot, offset: -16, size: 8, alignment: 8,
141+
stack-id: default, callee-saved-register: '$fp', callee-saved-restored: true,
142+
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
143+
- { id: 3, name: '', type: spill-slot, offset: -24, size: 8, alignment: 8,
144+
stack-id: default, callee-saved-register: '$x19', callee-saved-restored: true,
145+
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
146+
- { id: 4, name: '', type: spill-slot, offset: -32, size: 8, alignment: 8,
147+
stack-id: default, callee-saved-register: '$x20', callee-saved-restored: true,
148+
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
149+
- { id: 5, name: '', type: spill-slot, offset: -40, size: 8, alignment: 8,
150+
stack-id: default, callee-saved-register: '$x21', callee-saved-restored: true,
151+
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
152+
- { id: 6, name: '', type: spill-slot, offset: -48, size: 8, alignment: 8,
153+
stack-id: default, callee-saved-register: '$x22', callee-saved-restored: true,
154+
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
155+
- { id: 7, name: '', type: spill-slot, offset: -56, size: 8, alignment: 8,
156+
stack-id: default, callee-saved-register: '$x23', callee-saved-restored: true,
157+
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
158+
- { id: 8, name: '', type: spill-slot, offset: -64, size: 8, alignment: 8,
159+
stack-id: default, callee-saved-register: '$x24', callee-saved-restored: true,
160+
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
161+
- { id: 9, name: '', type: spill-slot, offset: -72, size: 8, alignment: 8,
162+
stack-id: default, callee-saved-register: '$x25', callee-saved-restored: true,
163+
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
164+
- { id: 10, name: '', type: spill-slot, offset: -80, size: 8, alignment: 8,
165+
stack-id: default, callee-saved-register: '$x26', callee-saved-restored: true,
166+
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
167+
- { id: 11, name: '', type: spill-slot, offset: -88, size: 8, alignment: 8,
168+
stack-id: default, callee-saved-register: '$x27', callee-saved-restored: true,
169+
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
170+
- { id: 12, name: '', type: spill-slot, offset: -96, size: 8, alignment: 8,
171+
stack-id: default, callee-saved-register: '$x28', callee-saved-restored: true,
172+
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
173+
entry_values: []
174+
callSites: []
175+
debugValueSubstitutions: []
176+
constants: []
177+
machineFunctionInfo:
178+
hasRedZone: false
179+
stackSizeZPR: 0
180+
stackSizePPR: 0
181+
hasStackFrame: true
182+
body: |
183+
bb.0 (%ir-block.2):
184+
successors: %bb.2(0x04000000), %bb.3(0x7c000000)
185+
liveins: $w2, $x0, $x1, $x3, $x4, $x5, $x6, $x7, $x27, $x28, $x25, $x26, $x23, $x24, $x21, $x22, $x19, $x20, $lr
186+
187+
$sp = frame-setup SUBXri $sp, 112, 0
188+
frame-setup STPXi killed $x28, killed $x27, $sp, 2 :: (store (s64) into %stack.12), (store (s64) into %stack.11)
189+
frame-setup STPXi killed $x26, killed $x25, $sp, 4 :: (store (s64) into %stack.10), (store (s64) into %stack.9)
190+
frame-setup STPXi killed $x24, killed $x23, $sp, 6 :: (store (s64) into %stack.8), (store (s64) into %stack.7)
191+
frame-setup STPXi killed $x22, killed $x21, $sp, 8 :: (store (s64) into %stack.6), (store (s64) into %stack.5)
192+
frame-setup STPXi killed $x20, killed $x19, $sp, 10 :: (store (s64) into %stack.4), (store (s64) into %stack.3)
193+
frame-setup STPXi $fp, killed $lr, $sp, 12 :: (store (s64) into %stack.2), (store (s64) into %stack.1)
194+
frame-setup CFI_INSTRUCTION def_cfa_offset 112
195+
frame-setup CFI_INSTRUCTION offset $w30, -8
196+
frame-setup CFI_INSTRUCTION offset $w29, -16
197+
frame-setup CFI_INSTRUCTION offset $w19, -24
198+
frame-setup CFI_INSTRUCTION offset $w20, -32
199+
frame-setup CFI_INSTRUCTION offset $w21, -40
200+
frame-setup CFI_INSTRUCTION offset $w22, -48
201+
frame-setup CFI_INSTRUCTION offset $w23, -56
202+
frame-setup CFI_INSTRUCTION offset $w24, -64
203+
frame-setup CFI_INSTRUCTION offset $w25, -72
204+
frame-setup CFI_INSTRUCTION offset $w26, -80
205+
frame-setup CFI_INSTRUCTION offset $w27, -88
206+
frame-setup CFI_INSTRUCTION offset $w28, -96
207+
DBG_PHI $x1, 1
208+
$x19 = ORRXrs $xzr, killed $x7, 0
209+
$x20 = ORRXrs $xzr, killed $x6, 0
210+
$x21 = ORRXrs $xzr, killed $x5, 0
211+
$x22 = ORRXrs $xzr, killed $x4, 0
212+
$x23 = ORRXrs $xzr, killed $x3, 0
213+
$w25 = ORRWrs $wzr, killed $w2, 0
214+
$x26 = ORRXrs $xzr, killed $x0, 0
215+
renamable $w27 = MOVZWi 1, 0
216+
STRXui killed $x1, $sp, 1 :: (store (s64) into %stack.0)
217+
TBNZW renamable $w25, 0, %bb.2
218+
219+
bb.3.if.end16:
220+
successors: %bb.2(0x04000000), %bb.3(0x7c000000)
221+
liveins: $w25, $w27, $x19, $x20, $x21, $x22, $x23, $x26
222+
223+
$x28 = ORRXrs $xzr, $xzr, 0
224+
renamable $x24 = LDRXui killed renamable $x28, 0 :: (load (s64) from `ptr null`)
225+
BL @_ZdlPvm, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp
226+
STRXui renamable $x21, renamable $x20, 0 :: (store (s64) into %ir.0)
227+
STRXui killed renamable $x24, renamable $x19, 0 :: (store (s64) into %ir.1)
228+
STRXui $xzr, renamable $x26, 0 :: (store (s64) into %ir.__first)
229+
STRWui $wzr, renamable $x23, 0 :: (store (s32) into %ir.__first.addr.0, align 8)
230+
STRWui renamable $w27, renamable $x22, 0 :: (store (s32) into %ir.Label3.i.i.i241)
231+
TBZW renamable $w25, 0, %bb.3
232+
233+
bb.2.if.then13:
234+
liveins: $x26
235+
236+
DBG_INSTR_REF !10, !DIExpression(DW_OP_LLVM_arg, 0), dbg-instr-ref(1, 0), debug-location !16
237+
renamable $x8 = LDRXui $sp, 1 :: (load (s64) from %stack.0)
238+
STRXui $xzr, $sp, 1 :: (store (s64) into %stack.0)
239+
$fp, $lr = frame-destroy LDPXi $sp, 12 :: (load (s64) from %stack.2), (load (s64) from %stack.1)
240+
$x20, $x19 = frame-destroy LDPXi $sp, 10 :: (load (s64) from %stack.4), (load (s64) from %stack.3)
241+
$xzr = SUBSXrs killed renamable $x26, killed renamable $x8, 0, implicit-def $nzcv, debug-location !23
242+
$x22, $x21 = frame-destroy LDPXi $sp, 8 :: (load (s64) from %stack.6), (load (s64) from %stack.5)
243+
$x24, $x23 = frame-destroy LDPXi $sp, 6 :: (load (s64) from %stack.8), (load (s64) from %stack.7)
244+
$x26, $x25 = frame-destroy LDPXi $sp, 4 :: (load (s64) from %stack.10), (load (s64) from %stack.9)
245+
$x28, $x27 = frame-destroy LDPXi $sp, 2 :: (load (s64) from %stack.12), (load (s64) from %stack.11)
246+
$sp = frame-destroy ADDXri $sp, 112, 0
247+
RET undef $lr
248+
...

0 commit comments

Comments
 (0)