Skip to content

Commit c2c6b6d

Browse files
author
git apple-llvm automerger
committed
Merge commit 'a852ee199c73' from llvm.org/master into apple/main
2 parents dd9b6b0 + a852ee1 commit c2c6b6d

File tree

7 files changed

+274
-20
lines changed

7 files changed

+274
-20
lines changed

llvm/lib/CodeGen/MachineDebugify.cpp

Lines changed: 87 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,23 @@
77
//===----------------------------------------------------------------------===//
88
///
99
/// \file This pass attaches synthetic debug info to everything. It can be used
10-
/// to create targeted tests for debug info preservation.
10+
/// to create targeted tests for debug info preservation, or test for CodeGen
11+
/// differences with vs. without debug info.
1112
///
1213
/// This isn't intended to have feature parity with Debugify.
1314
//===----------------------------------------------------------------------===//
1415

16+
#include "llvm/ADT/DenseMap.h"
17+
#include "llvm/ADT/SmallVector.h"
1518
#include "llvm/CodeGen/MachineFunctionPass.h"
19+
#include "llvm/CodeGen/MachineInstrBuilder.h"
1620
#include "llvm/CodeGen/MachineModuleInfo.h"
1721
#include "llvm/CodeGen/Passes.h"
22+
#include "llvm/CodeGen/TargetInstrInfo.h"
23+
#include "llvm/CodeGen/TargetSubtargetInfo.h"
1824
#include "llvm/IR/DIBuilder.h"
1925
#include "llvm/IR/DebugInfo.h"
26+
#include "llvm/IR/IntrinsicInst.h"
2027
#include "llvm/InitializePasses.h"
2128
#include "llvm/Transforms/Utils/Debugify.h"
2229

@@ -31,13 +38,15 @@ bool applyDebugifyMetadataToMachineFunction(MachineModuleInfo &MMI,
3138
if (!MaybeMF)
3239
return false;
3340
MachineFunction &MF = *MaybeMF;
41+
const TargetInstrInfo &TII = *MF.getSubtarget().getInstrInfo();
3442

3543
DISubprogram *SP = F.getSubprogram();
3644
assert(SP && "IR Debugify just created it?");
3745

38-
LLVMContext &Ctx = F.getParent()->getContext();
39-
unsigned NextLine = SP->getLine();
46+
Module &M = *F.getParent();
47+
LLVMContext &Ctx = M.getContext();
4048

49+
unsigned NextLine = SP->getLine();
4150
for (MachineBasicBlock &MBB : MF) {
4251
for (MachineInstr &MI : MBB) {
4352
// This will likely emit line numbers beyond the end of the imagined
@@ -48,6 +57,81 @@ bool applyDebugifyMetadataToMachineFunction(MachineModuleInfo &MMI,
4857
}
4958
}
5059

60+
// Find local variables defined by debugify. No attempt is made to match up
61+
// MIR-level regs to the 'correct' IR-level variables: there isn't a simple
62+
// way to do that, and it isn't necessary to find interesting CodeGen bugs.
63+
// Instead, simply keep track of one variable per line. Later, we can insert
64+
// DBG_VALUE insts that point to these local variables. Emitting DBG_VALUEs
65+
// which cover a wide range of lines can help stress the debug info passes:
66+
// if we can't do that, fall back to using the local variable which precedes
67+
// all the others.
68+
Function *DbgValF = M.getFunction("llvm.dbg.value");
69+
DbgValueInst *EarliestDVI = nullptr;
70+
DenseMap<unsigned, DILocalVariable *> Line2Var;
71+
DIExpression *Expr = nullptr;
72+
if (DbgValF) {
73+
for (const Use &U : DbgValF->uses()) {
74+
auto *DVI = dyn_cast<DbgValueInst>(U.getUser());
75+
if (!DVI || DVI->getFunction() != &F)
76+
continue;
77+
unsigned Line = DVI->getDebugLoc().getLine();
78+
assert(Line != 0 && "debugify should not insert line 0 locations");
79+
Line2Var[Line] = DVI->getVariable();
80+
if (!EarliestDVI || Line < EarliestDVI->getDebugLoc().getLine())
81+
EarliestDVI = DVI;
82+
Expr = DVI->getExpression();
83+
}
84+
}
85+
if (Line2Var.empty())
86+
return true;
87+
88+
// Now, try to insert a DBG_VALUE instruction after each real instruction.
89+
// Do this by introducing debug uses of each register definition. If that is
90+
// not possible (e.g. we have a phi or a meta instruction), emit a constant.
91+
uint64_t NextImm = 0;
92+
const MCInstrDesc &DbgValDesc = TII.get(TargetOpcode::DBG_VALUE);
93+
for (MachineBasicBlock &MBB : MF) {
94+
MachineBasicBlock::iterator FirstNonPHIIt = MBB.getFirstNonPHI();
95+
for (auto I = MBB.begin(), E = MBB.end(); I != E; ) {
96+
MachineInstr &MI = *I;
97+
++I;
98+
99+
// `I` may point to a DBG_VALUE created in the previous loop iteration.
100+
if (MI.isDebugInstr())
101+
continue;
102+
103+
// It's not allowed to insert DBG_VALUEs after a terminator.
104+
if (MI.isTerminator())
105+
continue;
106+
107+
// Find a suitable insertion point for the DBG_VALUE.
108+
auto InsertBeforeIt = MI.isPHI() ? FirstNonPHIIt : I;
109+
110+
// Find a suitable local variable for the DBG_VALUE.
111+
unsigned Line = MI.getDebugLoc().getLine();
112+
if (!Line2Var.count(Line))
113+
Line = EarliestDVI->getDebugLoc().getLine();
114+
DILocalVariable *LocalVar = Line2Var[Line];
115+
assert(LocalVar && "No variable for current line?");
116+
117+
// Emit DBG_VALUEs for register definitions.
118+
SmallVector<MachineOperand *, 4> RegDefs;
119+
for (MachineOperand &MO : MI.operands())
120+
if (MO.isReg() && MO.isDef() && MO.getReg())
121+
RegDefs.push_back(&MO);
122+
for (MachineOperand *MO : RegDefs)
123+
BuildMI(MBB, InsertBeforeIt, MI.getDebugLoc(), DbgValDesc,
124+
/*IsIndirect=*/false, *MO, LocalVar, Expr);
125+
126+
// OK, failing that, emit a constant DBG_VALUE.
127+
if (RegDefs.empty()) {
128+
auto ImmOp = MachineOperand::CreateImm(NextImm++);
129+
BuildMI(MBB, InsertBeforeIt, MI.getDebugLoc(), DbgValDesc,
130+
/*IsIndirect=*/false, ImmOp, LocalVar, Expr);
131+
}
132+
}
133+
}
134+
51135
return true;
52136
}
53137

llvm/lib/Transforms/Utils/Debugify.cpp

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ bool llvm::applyDebugifyMetadata(
7676

7777
DIBuilder DIB(M);
7878
LLVMContext &Ctx = M.getContext();
79+
auto *Int32Ty = Type::getInt32Ty(Ctx);
7980

8081
// Get a DIType which corresponds to Ty.
8182
DenseMap<uint64_t, DIType *> TypeCache;
@@ -100,6 +101,7 @@ bool llvm::applyDebugifyMetadata(
100101
if (isFunctionSkipped(F))
101102
continue;
102103

104+
bool InsertedDbgVal = false;
103105
auto SPType = DIB.createSubroutineType(DIB.getOrCreateTypeArray(None));
104106
DISubprogram::DISPFlags SPFlags =
105107
DISubprogram::SPFlagDefinition | DISubprogram::SPFlagOptimized;
@@ -108,6 +110,23 @@ bool llvm::applyDebugifyMetadata(
108110
auto SP = DIB.createFunction(CU, F.getName(), F.getName(), File, NextLine,
109111
SPType, NextLine, DINode::FlagZero, SPFlags);
110112
F.setSubprogram(SP);
113+
114+
// Helper that inserts a dbg.value before \p InsertBefore, copying the
115+
// location (and possibly the type, if it's non-void) from \p TemplateInst.
116+
auto insertDbgVal = [&](Instruction &TemplateInst,
117+
Instruction *InsertBefore) {
118+
std::string Name = utostr(NextVar++);
119+
Value *V = &TemplateInst;
120+
if (TemplateInst.getType()->isVoidTy())
121+
V = ConstantInt::get(Int32Ty, 0);
122+
const DILocation *Loc = TemplateInst.getDebugLoc().get();
123+
auto LocalVar = DIB.createAutoVariable(SP, Name, File, Loc->getLine(),
124+
getCachedDIType(V->getType()),
125+
/*AlwaysPreserve=*/true);
126+
DIB.insertDbgValueIntrinsic(V, LocalVar, DIB.createExpression(), Loc,
127+
InsertBefore);
128+
};
129+
111130
for (BasicBlock &BB : F) {
112131
// Attach debug locations.
113132
for (Instruction &I : BB)
@@ -142,15 +161,19 @@ bool llvm::applyDebugifyMetadata(
142161
if (!isa<PHINode>(I) && !I->isEHPad())
143162
InsertBefore = I->getNextNode();
144163

145-
std::string Name = utostr(NextVar++);
146-
const DILocation *Loc = I->getDebugLoc().get();
147-
auto LocalVar = DIB.createAutoVariable(SP, Name, File, Loc->getLine(),
148-
getCachedDIType(I->getType()),
149-
/*AlwaysPreserve=*/true);
150-
DIB.insertDbgValueIntrinsic(I, LocalVar, DIB.createExpression(), Loc,
151-
InsertBefore);
164+
insertDbgVal(*I, InsertBefore);
165+
InsertedDbgVal = true;
152166
}
153167
}
168+
// Make sure we emit at least one dbg.value, otherwise MachineDebugify may
169+
// not have anything to work with as it goes about inserting DBG_VALUEs.
170+
// (It's common for MIR tests to be written containing skeletal IR with
171+
// empty functions -- we're still interested in debugifying the MIR within
172+
// those tests, and this helps with that.)
173+
if (DebugifyLevel == Level::LocationsAndVariables && !InsertedDbgVal) {
174+
auto *Term = findTerminatingInstruction(F.getEntryBlock());
175+
insertDbgVal(*Term, Term);
176+
}
154177
if (ApplyToMF)
155178
ApplyToMF(DIB, F);
156179
DIB.finalizeSubprogram(SP);
@@ -159,10 +182,9 @@ bool llvm::applyDebugifyMetadata(
159182

160183
// Track the number of distinct lines and variables.
161184
NamedMDNode *NMD = M.getOrInsertNamedMetadata("llvm.debugify");
162-
auto *IntTy = Type::getInt32Ty(Ctx);
163185
auto addDebugifyOperand = [&](unsigned N) {
164186
NMD->addOperand(MDNode::get(
165-
Ctx, ValueAsMetadata::getConstant(ConstantInt::get(IntTy, N))));
187+
Ctx, ValueAsMetadata::getConstant(ConstantInt::get(Int32Ty, N))));
166188
};
167189
addDebugifyOperand(NextLine - 1); // Original number of lines.
168190
addDebugifyOperand(NextVar - 1); // Original number of variables.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2+
# RUN: llc -debugify-and-strip-all-safe=0 -run-pass=mir-debugify -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s
3+
...
4+
---
5+
name: fconstant_to_constant_s32
6+
alignment: 4
7+
tracksRegLiveness: true
8+
frameInfo:
9+
maxAlignment: 1
10+
machineFunctionInfo: {}
11+
body: |
12+
bb.0:
13+
liveins: $x0
14+
; CHECK-LABEL: name: fconstant_to_constant_s32
15+
; CHECK: liveins: $x0
16+
; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x0, debug-location !10
17+
; CHECK: DBG_VALUE [[COPY]](p0), $noreg, !8, !DIExpression(), debug-location !10
18+
; CHECK: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 0x3FA99999A0000000, debug-location !DILocation(line: 2, column: 1, scope: !5)
19+
; CHECK: DBG_VALUE [[C]](s32), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 2, column: 1, scope: !5)
20+
; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 524, debug-location !DILocation(line: 3, column: 1, scope: !5)
21+
; CHECK: DBG_VALUE [[C1]](s64), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 3, column: 1, scope: !5)
22+
; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C1]](s64), debug-location !DILocation(line: 4, column: 1, scope: !5)
23+
; CHECK: DBG_VALUE [[PTR_ADD]](p0), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 4, column: 1, scope: !5)
24+
; CHECK: G_STORE [[C]](s32), [[PTR_ADD]](p0), debug-location !DILocation(line: 5, column: 1, scope: !5) :: (store 4)
25+
; CHECK: DBG_VALUE 0, $noreg, !8, !DIExpression(), debug-location !DILocation(line: 5, column: 1, scope: !5)
26+
; CHECK: RET_ReallyLR debug-location !DILocation(line: 6, column: 1, scope: !5)
27+
%0:_(p0) = COPY $x0
28+
%3:_(s32) = G_FCONSTANT float 0x3FA99999A0000000
29+
%1:_(s64) = G_CONSTANT i64 524
30+
%2:_(p0) = G_PTR_ADD %0, %1(s64)
31+
G_STORE %3(s32), %2(p0) :: (store 4)
32+
RET_ReallyLR
33+
...

llvm/test/CodeGen/AArch64/GlobalISel/legalize-phi-insertpt-decrement.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2-
# RUN: llc -O0 -mtriple=aarch64-unknown-unknown -verify-machineinstrs -run-pass=legalizer %s -o - | FileCheck %s
2+
# RUN: llc -debugify-and-strip-all-safe -O0 -mtriple=aarch64-unknown-unknown -verify-machineinstrs -run-pass=legalizer %s -o - | FileCheck %s
33
--- |
44
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
55

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2+
# RUN: llc -debugify-and-strip-all-safe=0 -run-pass=mir-debugify -verify-machineinstrs %s -o - | FileCheck %s
3+
--- |
4+
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
5+
target triple = "aarch64-unknown-unknown"
6+
7+
define i32 @legalize_phi(i32 %argc) {
8+
entry:
9+
ret i32 0
10+
}
11+
12+
...
13+
---
14+
name: legalize_phi
15+
alignment: 4
16+
exposesReturnsTwice: false
17+
legalized: false
18+
regBankSelected: false
19+
selected: false
20+
tracksRegLiveness: true
21+
registers:
22+
- { id: 0, class: _, preferred-register: '' }
23+
- { id: 1, class: _, preferred-register: '' }
24+
- { id: 2, class: _, preferred-register: '' }
25+
- { id: 3, class: _, preferred-register: '' }
26+
- { id: 4, class: _, preferred-register: '' }
27+
- { id: 5, class: _, preferred-register: '' }
28+
- { id: 6, class: _, preferred-register: '' }
29+
- { id: 7, class: _, preferred-register: '' }
30+
- { id: 8, class: _, preferred-register: '' }
31+
- { id: 9, class: _, preferred-register: '' }
32+
- { id: 10, class: _, preferred-register: '' }
33+
liveins:
34+
body: |
35+
; CHECK-LABEL: name: legalize_phi
36+
; CHECK: bb.0:
37+
; CHECK: successors: %bb.1(0x40000000), %bb.2(0x40000000)
38+
; CHECK: liveins: $w0
39+
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0, debug-location !10
40+
; CHECK: DBG_VALUE [[COPY]](s32), $noreg, !8, !DIExpression(), debug-location !10
41+
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0, debug-location !DILocation(line: 2, column: 1, scope: !5)
42+
; CHECK: DBG_VALUE [[C]](s32), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 2, column: 1, scope: !5)
43+
; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1, debug-location !DILocation(line: 3, column: 1, scope: !5)
44+
; CHECK: DBG_VALUE [[C1]](s32), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 3, column: 1, scope: !5)
45+
; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2, debug-location !DILocation(line: 4, column: 1, scope: !5)
46+
; CHECK: DBG_VALUE [[C2]](s32), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 4, column: 1, scope: !5)
47+
; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ugt), [[COPY]](s32), [[C]], debug-location !DILocation(line: 5, column: 1, scope: !5)
48+
; CHECK: DBG_VALUE [[ICMP]](s1), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 5, column: 1, scope: !5)
49+
; CHECK: G_BRCOND [[ICMP]](s1), %bb.1, debug-location !DILocation(line: 6, column: 1, scope: !5)
50+
; CHECK: G_BR %bb.2, debug-location !DILocation(line: 7, column: 1, scope: !5)
51+
; CHECK: bb.1:
52+
; CHECK: successors: %bb.3(0x80000000)
53+
; CHECK: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[C1]], debug-location !DILocation(line: 8, column: 1, scope: !5)
54+
; CHECK: DBG_VALUE [[ADD]](s32), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 8, column: 1, scope: !5)
55+
; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ADD]](s32), debug-location !DILocation(line: 9, column: 1, scope: !5)
56+
; CHECK: DBG_VALUE [[TRUNC]](s1), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 9, column: 1, scope: !5)
57+
; CHECK: G_BR %bb.3, debug-location !DILocation(line: 10, column: 1, scope: !5)
58+
; CHECK: bb.2:
59+
; CHECK: successors: %bb.3(0x80000000)
60+
; CHECK: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[C2]], debug-location !DILocation(line: 11, column: 1, scope: !5)
61+
; CHECK: DBG_VALUE [[ADD1]](s32), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 11, column: 1, scope: !5)
62+
; CHECK: [[TRUNC1:%[0-9]+]]:_(s1) = G_TRUNC [[ADD1]](s32), debug-location !DILocation(line: 12, column: 1, scope: !5)
63+
; CHECK: DBG_VALUE [[TRUNC1]](s1), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 12, column: 1, scope: !5)
64+
; CHECK: bb.3:
65+
; CHECK: [[PHI:%[0-9]+]]:_(s1) = G_PHI [[TRUNC]](s1), %bb.1, [[TRUNC1]](s1), %bb.2, debug-location !DILocation(line: 13, column: 1, scope: !5)
66+
; CHECK: [[PHI1:%[0-9]+]]:_(s1) = G_PHI [[TRUNC]](s1), %bb.1, [[TRUNC1]](s1), %bb.2, debug-location !DILocation(line: 14, column: 1, scope: !5)
67+
; CHECK: DBG_VALUE [[PHI]](s1), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 13, column: 1, scope: !5)
68+
; CHECK: DBG_VALUE [[PHI1]](s1), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 14, column: 1, scope: !5)
69+
; CHECK: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[PHI]](s1), debug-location !DILocation(line: 15, column: 1, scope: !5)
70+
; CHECK: DBG_VALUE [[ZEXT]](s32), $noreg, !8, !DIExpression(), debug-location !DILocation(line: 15, column: 1, scope: !5)
71+
; CHECK: $w0 = COPY [[ZEXT]](s32), debug-location !DILocation(line: 16, column: 1, scope: !5)
72+
; CHECK: DBG_VALUE $w0, $noreg, !8, !DIExpression(), debug-location !DILocation(line: 16, column: 1, scope: !5)
73+
; CHECK: RET_ReallyLR implicit $w0, debug-location !DILocation(line: 17, column: 1, scope: !5)
74+
bb.0:
75+
successors: %bb.1(0x40000000), %bb.2(0x40000000)
76+
liveins: $w0
77+
78+
%0(s32) = COPY $w0
79+
%1(s32) = G_CONSTANT i32 0
80+
%3(s32) = G_CONSTANT i32 1
81+
%6(s32) = G_CONSTANT i32 2
82+
%2(s1) = G_ICMP intpred(ugt), %0(s32), %1
83+
G_BRCOND %2(s1), %bb.1
84+
G_BR %bb.2
85+
86+
bb.1:
87+
successors: %bb.3(0x80000000)
88+
89+
%4(s32) = G_ADD %0, %3
90+
%5(s1) = G_TRUNC %4(s32)
91+
G_BR %bb.3
92+
93+
bb.2:
94+
successors: %bb.3(0x80000000)
95+
96+
%7(s32) = G_ADD %0, %6
97+
%8(s1) = G_TRUNC %7(s32)
98+
99+
bb.3:
100+
%9(s1) = G_PHI %5(s1), %bb.1, %8(s1), %bb.2
101+
%11:_(s1) = G_PHI %5(s1), %bb.1, %8(s1), %bb.2
102+
%10(s32) = G_ZEXT %9(s1)
103+
$w0 = COPY %10(s32)
104+
RET_ReallyLR implicit $w0
105+
106+
...

llvm/test/CodeGen/Generic/MIRDebugify/locations.mir renamed to llvm/test/CodeGen/Generic/MIRDebugify/locations-and-values.mir

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
ret i32 %sub
1818
}
1919

20-
; CHECK: !llvm.dbg.cu = !{!0}
21-
; CHECK: !llvm.debugify =
22-
; CHECK: !llvm.module.flags = !{![[VERSION:[0-9]+]]}
23-
; CHECK: !0 = distinct !DICompileUnit(
24-
; CHECK: ![[VERSION]] = !{i32 2, !"Debug Info Version", i32 3}
20+
; ALL: !llvm.dbg.cu = !{!0}
21+
; ALL: !llvm.debugify =
22+
; ALL: !llvm.module.flags = !{![[VERSION:[0-9]+]]}
23+
; ALL: !0 = distinct !DICompileUnit(
24+
; ALL: ![[VERSION]] = !{i32 2, !"Debug Info Version", i32 3}
25+
; VALUE: [[VAR1:![0-9]+]] = !DILocalVariable(name: "1"
26+
; VALUE: [[VAR2:![0-9]+]] = !DILocalVariable(name: "2"
2527

2628
...
2729
---
@@ -37,8 +39,13 @@ body: |
3739
; source file anyway. These first three coincide with IR-level information
3840
; and therefore use metadata references.
3941
; ALL: %0:_(s32) = IMPLICIT_DEF debug-location [[L1]]
42+
; VALUE: DBG_VALUE %0(s32), $noreg, [[VAR1]], !DIExpression(), debug-location [[L1]]
4043
; ALL: %1:_(s32) = IMPLICIT_DEF debug-location [[L2]]
44+
; VALUE: DBG_VALUE %1(s32), $noreg, [[VAR2]], !DIExpression(), debug-location [[L2]]
4145
; ALL: %2:_(s32) = G_CONSTANT i32 2, debug-location [[L3]]
46+
; VALUE: DBG_VALUE %2(s32), $noreg, [[VAR1]], !DIExpression(), debug-location [[L3]]
4247
; ALL: %3:_(s32) = G_ADD %0, %2, debug-location !DILocation(line: 4, column: 1, scope: !6)
48+
; VALUE: DBG_VALUE %3(s32), $noreg, [[VAR1]], !DIExpression(), debug-location !DILocation(line: 4
4349
; ALL: %4:_(s32) = G_SUB %3, %1, debug-location !DILocation(line: 5, column: 1, scope: !6)
50+
; VALUE: DBG_VALUE %4(s32), $noreg, [[VAR1]], !DIExpression(), debug-location !DILocation(line: 5
4451
...

0 commit comments

Comments
 (0)