Skip to content

Commit 7c53e9f

Browse files
authored
[RemoveDIs][DebugInfo] Add support for DPValues to LoopStrengthReduce (llvm#78706)
This patch trivially extends support for DbgValueInst recovery to DPValues in LoopStrengthReduce; they are handled identically, so this is mostly done by reusing the DbgValueInst code (using templates or auto-parameter lambdas to reduce actual code duplication).
1 parent 1be0d9d commit 7c53e9f

16 files changed

+151
-104
lines changed

llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Lines changed: 136 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -6366,10 +6366,12 @@ struct SCEVDbgValueBuilder {
63666366
/// and DIExpression.
63676367
struct DVIRecoveryRec {
63686368
DVIRecoveryRec(DbgValueInst *DbgValue)
6369-
: DVI(DbgValue), Expr(DbgValue->getExpression()),
6369+
: DbgRef(DbgValue), Expr(DbgValue->getExpression()),
63706370
HadLocationArgList(false) {}
6371+
DVIRecoveryRec(DPValue *DPV)
6372+
: DbgRef(DPV), Expr(DPV->getExpression()), HadLocationArgList(false) {}
63716373

6372-
DbgValueInst *DVI;
6374+
PointerUnion<DbgValueInst *, DPValue *> DbgRef;
63736375
DIExpression *Expr;
63746376
bool HadLocationArgList;
63756377
SmallVector<WeakVH, 2> LocationOps;
@@ -6401,17 +6403,19 @@ static unsigned numLLVMArgOps(SmallVectorImpl<uint64_t> &Expr) {
64016403
/// Overwrites DVI with the location and Ops as the DIExpression. This will
64026404
/// create an invalid expression if Ops has any dwarf::DW_OP_llvm_arg operands,
64036405
/// because a DIArglist is not created for the first argument of the dbg.value.
6404-
static void updateDVIWithLocation(DbgValueInst &DVI, Value *Location,
6406+
template <typename T>
6407+
static void updateDVIWithLocation(T &DbgVal, Value *Location,
64056408
SmallVectorImpl<uint64_t> &Ops) {
6406-
assert(
6407-
numLLVMArgOps(Ops) == 0 &&
6408-
"Expected expression that does not contain any DW_OP_llvm_arg operands.");
6409-
DVI.setRawLocation(ValueAsMetadata::get(Location));
6410-
DVI.setExpression(DIExpression::get(DVI.getContext(), Ops));
6409+
assert(numLLVMArgOps(Ops) == 0 && "Expected expression that does not "
6410+
"contain any DW_OP_llvm_arg operands.");
6411+
DbgVal.setRawLocation(ValueAsMetadata::get(Location));
6412+
DbgVal.setExpression(DIExpression::get(DbgVal.getContext(), Ops));
6413+
DbgVal.setExpression(DIExpression::get(DbgVal.getContext(), Ops));
64116414
}
64126415

64136416
/// Overwrite DVI with locations placed into a DIArglist.
6414-
static void updateDVIWithLocations(DbgValueInst &DVI,
6417+
template <typename T>
6418+
static void updateDVIWithLocations(T &DbgVal,
64156419
SmallVectorImpl<Value *> &Locations,
64166420
SmallVectorImpl<uint64_t> &Ops) {
64176421
assert(numLLVMArgOps(Ops) != 0 &&
@@ -6421,8 +6425,8 @@ static void updateDVIWithLocations(DbgValueInst &DVI,
64216425
for (Value *V : Locations)
64226426
MetadataLocs.push_back(ValueAsMetadata::get(V));
64236427
auto ValArrayRef = llvm::ArrayRef<llvm::ValueAsMetadata *>(MetadataLocs);
6424-
DVI.setRawLocation(llvm::DIArgList::get(DVI.getContext(), ValArrayRef));
6425-
DVI.setExpression(DIExpression::get(DVI.getContext(), Ops));
6428+
DbgVal.setRawLocation(llvm::DIArgList::get(DbgVal.getContext(), ValArrayRef));
6429+
DbgVal.setExpression(DIExpression::get(DbgVal.getContext(), Ops));
64266430
}
64276431

64286432
/// Write the new expression and new location ops for the dbg.value. If possible
@@ -6433,30 +6437,37 @@ static void updateDVIWithLocations(DbgValueInst &DVI,
64336437
static void UpdateDbgValueInst(DVIRecoveryRec &DVIRec,
64346438
SmallVectorImpl<Value *> &NewLocationOps,
64356439
SmallVectorImpl<uint64_t> &NewExpr) {
6436-
unsigned NumLLVMArgs = numLLVMArgOps(NewExpr);
6437-
if (NumLLVMArgs == 0) {
6438-
// Location assumed to be on the stack.
6439-
updateDVIWithLocation(*DVIRec.DVI, NewLocationOps[0], NewExpr);
6440-
} else if (NumLLVMArgs == 1 && NewExpr[0] == dwarf::DW_OP_LLVM_arg) {
6441-
// There is only a single DW_OP_llvm_arg at the start of the expression,
6442-
// so it can be omitted along with DIArglist.
6443-
assert(NewExpr[1] == 0 &&
6444-
"Lone LLVM_arg in a DIExpression should refer to location-op 0.");
6445-
llvm::SmallVector<uint64_t, 6> ShortenedOps(llvm::drop_begin(NewExpr, 2));
6446-
updateDVIWithLocation(*DVIRec.DVI, NewLocationOps[0], ShortenedOps);
6447-
} else {
6448-
// Multiple DW_OP_llvm_arg, so DIArgList is strictly necessary.
6449-
updateDVIWithLocations(*DVIRec.DVI, NewLocationOps, NewExpr);
6450-
}
6440+
auto UpdateDbgValueInstImpl = [&](auto *DbgVal) {
6441+
unsigned NumLLVMArgs = numLLVMArgOps(NewExpr);
6442+
if (NumLLVMArgs == 0) {
6443+
// Location assumed to be on the stack.
6444+
updateDVIWithLocation(*DbgVal, NewLocationOps[0], NewExpr);
6445+
} else if (NumLLVMArgs == 1 && NewExpr[0] == dwarf::DW_OP_LLVM_arg) {
6446+
// There is only a single DW_OP_llvm_arg at the start of the expression,
6447+
// so it can be omitted along with DIArglist.
6448+
assert(NewExpr[1] == 0 &&
6449+
"Lone LLVM_arg in a DIExpression should refer to location-op 0.");
6450+
llvm::SmallVector<uint64_t, 6> ShortenedOps(llvm::drop_begin(NewExpr, 2));
6451+
updateDVIWithLocation(*DbgVal, NewLocationOps[0], ShortenedOps);
6452+
} else {
6453+
// Multiple DW_OP_llvm_arg, so DIArgList is strictly necessary.
6454+
updateDVIWithLocations(*DbgVal, NewLocationOps, NewExpr);
6455+
}
64516456

6452-
// If the DIExpression was previously empty then add the stack terminator.
6453-
// Non-empty expressions have only had elements inserted into them and so the
6454-
// terminator should already be present e.g. stack_value or fragment.
6455-
DIExpression *SalvageExpr = DVIRec.DVI->getExpression();
6456-
if (!DVIRec.Expr->isComplex() && SalvageExpr->isComplex()) {
6457-
SalvageExpr = DIExpression::append(SalvageExpr, {dwarf::DW_OP_stack_value});
6458-
DVIRec.DVI->setExpression(SalvageExpr);
6459-
}
6457+
// If the DIExpression was previously empty then add the stack terminator.
6458+
// Non-empty expressions have only had elements inserted into them and so
6459+
// the terminator should already be present e.g. stack_value or fragment.
6460+
DIExpression *SalvageExpr = DbgVal->getExpression();
6461+
if (!DVIRec.Expr->isComplex() && SalvageExpr->isComplex()) {
6462+
SalvageExpr =
6463+
DIExpression::append(SalvageExpr, {dwarf::DW_OP_stack_value});
6464+
DbgVal->setExpression(SalvageExpr);
6465+
}
6466+
};
6467+
if (isa<DbgValueInst *>(DVIRec.DbgRef))
6468+
UpdateDbgValueInstImpl(cast<DbgValueInst *>(DVIRec.DbgRef));
6469+
else
6470+
UpdateDbgValueInstImpl(cast<DPValue *>(DVIRec.DbgRef));
64606471
}
64616472

64626473
/// Cached location ops may be erased during LSR, in which case a poison is
@@ -6470,40 +6481,49 @@ static Value *getValueOrPoison(WeakVH &VH, LLVMContext &C) {
64706481

64716482
/// Restore the DVI's pre-LSR arguments. Substitute undef for any erased values.
64726483
static void restorePreTransformState(DVIRecoveryRec &DVIRec) {
6473-
LLVM_DEBUG(dbgs() << "scev-salvage: restore dbg.value to pre-LSR state\n"
6474-
<< "scev-salvage: post-LSR: " << *DVIRec.DVI << '\n');
6475-
assert(DVIRec.Expr && "Expected an expression");
6476-
DVIRec.DVI->setExpression(DVIRec.Expr);
6477-
6478-
// Even a single location-op may be inside a DIArgList and referenced with
6479-
// DW_OP_LLVM_arg, which is valid only with a DIArgList.
6480-
if (!DVIRec.HadLocationArgList) {
6481-
assert(DVIRec.LocationOps.size() == 1 &&
6482-
"Unexpected number of location ops.");
6483-
// LSR's unsuccessful salvage attempt may have added DIArgList, which in
6484-
// this case was not present before, so force the location back to a single
6485-
// uncontained Value.
6486-
Value *CachedValue =
6487-
getValueOrPoison(DVIRec.LocationOps[0], DVIRec.DVI->getContext());
6488-
DVIRec.DVI->setRawLocation(ValueAsMetadata::get(CachedValue));
6489-
} else {
6490-
SmallVector<ValueAsMetadata *, 3> MetadataLocs;
6491-
for (WeakVH VH : DVIRec.LocationOps) {
6492-
Value *CachedValue = getValueOrPoison(VH, DVIRec.DVI->getContext());
6493-
MetadataLocs.push_back(ValueAsMetadata::get(CachedValue));
6484+
auto RestorePreTransformStateImpl = [&](auto *DbgVal) {
6485+
LLVM_DEBUG(dbgs() << "scev-salvage: restore dbg.value to pre-LSR state\n"
6486+
<< "scev-salvage: post-LSR: " << *DbgVal << '\n');
6487+
assert(DVIRec.Expr && "Expected an expression");
6488+
DbgVal->setExpression(DVIRec.Expr);
6489+
6490+
// Even a single location-op may be inside a DIArgList and referenced with
6491+
// DW_OP_LLVM_arg, which is valid only with a DIArgList.
6492+
if (!DVIRec.HadLocationArgList) {
6493+
assert(DVIRec.LocationOps.size() == 1 &&
6494+
"Unexpected number of location ops.");
6495+
// LSR's unsuccessful salvage attempt may have added DIArgList, which in
6496+
// this case was not present before, so force the location back to a
6497+
// single uncontained Value.
6498+
Value *CachedValue =
6499+
getValueOrPoison(DVIRec.LocationOps[0], DbgVal->getContext());
6500+
DbgVal->setRawLocation(ValueAsMetadata::get(CachedValue));
6501+
} else {
6502+
SmallVector<ValueAsMetadata *, 3> MetadataLocs;
6503+
for (WeakVH VH : DVIRec.LocationOps) {
6504+
Value *CachedValue = getValueOrPoison(VH, DbgVal->getContext());
6505+
MetadataLocs.push_back(ValueAsMetadata::get(CachedValue));
6506+
}
6507+
auto ValArrayRef = llvm::ArrayRef<llvm::ValueAsMetadata *>(MetadataLocs);
6508+
DbgVal->setRawLocation(
6509+
llvm::DIArgList::get(DbgVal->getContext(), ValArrayRef));
64946510
}
6495-
auto ValArrayRef = llvm::ArrayRef<llvm::ValueAsMetadata *>(MetadataLocs);
6496-
DVIRec.DVI->setRawLocation(
6497-
llvm::DIArgList::get(DVIRec.DVI->getContext(), ValArrayRef));
6498-
}
6499-
LLVM_DEBUG(dbgs() << "scev-salvage: pre-LSR: " << *DVIRec.DVI << '\n');
6511+
LLVM_DEBUG(dbgs() << "scev-salvage: pre-LSR: " << *DbgVal << '\n');
6512+
};
6513+
if (isa<DbgValueInst *>(DVIRec.DbgRef))
6514+
RestorePreTransformStateImpl(cast<DbgValueInst *>(DVIRec.DbgRef));
6515+
else
6516+
RestorePreTransformStateImpl(cast<DPValue *>(DVIRec.DbgRef));
65006517
}
65016518

65026519
static bool SalvageDVI(llvm::Loop *L, ScalarEvolution &SE,
65036520
llvm::PHINode *LSRInductionVar, DVIRecoveryRec &DVIRec,
65046521
const SCEV *SCEVInductionVar,
65056522
SCEVDbgValueBuilder IterCountExpr) {
6506-
if (!DVIRec.DVI->isKillLocation())
6523+
6524+
if (isa<DbgValueInst *>(DVIRec.DbgRef)
6525+
? !cast<DbgValueInst *>(DVIRec.DbgRef)->isKillLocation()
6526+
: !cast<DPValue *>(DVIRec.DbgRef)->isKillLocation())
65076527
return false;
65086528

65096529
// LSR may have caused several changes to the dbg.value in the failed salvage
@@ -6596,16 +6616,20 @@ static bool SalvageDVI(llvm::Loop *L, ScalarEvolution &SE,
65966616
}
65976617

65986618
UpdateDbgValueInst(DVIRec, NewLocationOps, NewExpr);
6599-
LLVM_DEBUG(dbgs() << "scev-salvage: Updated DVI: " << *DVIRec.DVI << "\n");
6619+
if (isa<DbgValueInst *>(DVIRec.DbgRef))
6620+
LLVM_DEBUG(dbgs() << "scev-salvage: Updated DVI: "
6621+
<< *cast<DbgValueInst *>(DVIRec.DbgRef) << "\n");
6622+
else
6623+
LLVM_DEBUG(dbgs() << "scev-salvage: Updated DVI: "
6624+
<< *cast<DPValue *>(DVIRec.DbgRef) << "\n");
66006625
return true;
66016626
}
66026627

66036628
/// Obtain an expression for the iteration count, then attempt to salvage the
66046629
/// dbg.value intrinsics.
6605-
static void
6606-
DbgRewriteSalvageableDVIs(llvm::Loop *L, ScalarEvolution &SE,
6607-
llvm::PHINode *LSRInductionVar,
6608-
SmallVector<std::unique_ptr<DVIRecoveryRec>, 2> &DVIToUpdate) {
6630+
static void DbgRewriteSalvageableDVIs(
6631+
llvm::Loop *L, ScalarEvolution &SE, llvm::PHINode *LSRInductionVar,
6632+
SmallVector<std::unique_ptr<DVIRecoveryRec>, 2> &DVIToUpdate) {
66096633
if (DVIToUpdate.empty())
66106634
return;
66116635

@@ -6647,48 +6671,56 @@ static void DbgGatherSalvagableDVI(
66476671
SmallSet<AssertingVH<DbgValueInst>, 2> &DVIHandles) {
66486672
for (const auto &B : L->getBlocks()) {
66496673
for (auto &I : *B) {
6650-
auto DVI = dyn_cast<DbgValueInst>(&I);
6651-
if (!DVI)
6652-
continue;
6653-
// Ensure that if any location op is undef that the dbg.vlue is not
6654-
// cached.
6655-
if (DVI->isKillLocation())
6656-
continue;
6657-
6658-
// Check that the location op SCEVs are suitable for translation to
6659-
// DIExpression.
6660-
const auto &HasTranslatableLocationOps =
6661-
[&](const DbgValueInst *DVI) -> bool {
6662-
for (const auto LocOp : DVI->location_ops()) {
6663-
if (!LocOp)
6664-
return false;
6665-
6666-
if (!SE.isSCEVable(LocOp->getType()))
6667-
return false;
6668-
6669-
const SCEV *S = SE.getSCEV(LocOp);
6670-
if (SE.containsUndefs(S))
6671-
return false;
6674+
auto ProcessDbgValue = [&](auto *DbgVal) -> bool {
6675+
// Ensure that if any location op is undef that the dbg.vlue is not
6676+
// cached.
6677+
if (DbgVal->isKillLocation())
6678+
return false;
6679+
6680+
// Check that the location op SCEVs are suitable for translation to
6681+
// DIExpression.
6682+
const auto &HasTranslatableLocationOps =
6683+
[&](const auto *DbgValToTranslate) -> bool {
6684+
for (const auto LocOp : DbgValToTranslate->location_ops()) {
6685+
if (!LocOp)
6686+
return false;
6687+
6688+
if (!SE.isSCEVable(LocOp->getType()))
6689+
return false;
6690+
6691+
const SCEV *S = SE.getSCEV(LocOp);
6692+
if (SE.containsUndefs(S))
6693+
return false;
6694+
}
6695+
return true;
6696+
};
6697+
6698+
if (!HasTranslatableLocationOps(DbgVal))
6699+
return false;
6700+
6701+
std::unique_ptr<DVIRecoveryRec> NewRec =
6702+
std::make_unique<DVIRecoveryRec>(DbgVal);
6703+
// Each location Op may need a SCEVDbgValueBuilder in order to recover
6704+
// it. Pre-allocating a vector will enable quick lookups of the builder
6705+
// later during the salvage.
6706+
NewRec->RecoveryExprs.resize(DbgVal->getNumVariableLocationOps());
6707+
for (const auto LocOp : DbgVal->location_ops()) {
6708+
NewRec->SCEVs.push_back(SE.getSCEV(LocOp));
6709+
NewRec->LocationOps.push_back(LocOp);
6710+
NewRec->HadLocationArgList = DbgVal->hasArgList();
66726711
}
6712+
SalvageableDVISCEVs.push_back(std::move(NewRec));
66736713
return true;
66746714
};
6675-
6676-
if (!HasTranslatableLocationOps(DVI))
6677-
continue;
6678-
6679-
std::unique_ptr<DVIRecoveryRec> NewRec =
6680-
std::make_unique<DVIRecoveryRec>(DVI);
6681-
// Each location Op may need a SCEVDbgValueBuilder in order to recover it.
6682-
// Pre-allocating a vector will enable quick lookups of the builder later
6683-
// during the salvage.
6684-
NewRec->RecoveryExprs.resize(DVI->getNumVariableLocationOps());
6685-
for (const auto LocOp : DVI->location_ops()) {
6686-
NewRec->SCEVs.push_back(SE.getSCEV(LocOp));
6687-
NewRec->LocationOps.push_back(LocOp);
6688-
NewRec->HadLocationArgList = DVI->hasArgList();
6715+
for (auto &DPV : I.getDbgValueRange()) {
6716+
if (DPV.isDbgValue() || DPV.isDbgAssign())
6717+
ProcessDbgValue(&DPV);
66896718
}
6690-
SalvageableDVISCEVs.push_back(std::move(NewRec));
6691-
DVIHandles.insert(DVI);
6719+
auto DVI = dyn_cast<DbgValueInst>(&I);
6720+
if (!DVI)
6721+
continue;
6722+
if (ProcessDbgValue(DVI))
6723+
DVIHandles.insert(DVI);
66926724
}
66936725
}
66946726
}

llvm/test/Transforms/LoopStrengthReduce/X86/lsr-cond-dbg.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt -S -loop-reduce < %s | FileCheck %s
2+
; RUN: opt --try-experimental-debuginfo-iterators -S -loop-reduce < %s | FileCheck %s
23

34
; During Loop Strength Reduce, if the terminating condition for the loop is not
45
; immediately adjacent to the terminating branch and it has more than one use,

llvm/test/Transforms/LoopStrengthReduce/dbg-preserve-0.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt -loop-reduce -S %s | FileCheck %s
2+
; RUN: opt --try-experimental-debuginfo-iterators -loop-reduce -S %s | FileCheck %s
23

34
;; Test that LSR preserves debug-info for induction variables and scev-based
45
;; salvaging produces short DIExpressions that use a constant offset from the

llvm/test/Transforms/LoopStrengthReduce/dbg-preserve-1.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt < %s -loop-reduce -S | FileCheck %s
2+
; RUN: opt --try-experimental-debuginfo-iterators < %s -loop-reduce -S | FileCheck %s
23
;
34
; Test that LSR avoids crashing on very large integer inputs. It should
45
; discard the variable location by creating an undef dbg.value.

llvm/test/Transforms/LoopStrengthReduce/dbg-preserve-2.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt < %s -loop-reduce -S | FileCheck %s
2+
; RUN: opt --try-experimental-debuginfo-iterators < %s -loop-reduce -S | FileCheck %s
23

34
; Test that LSR does not produce invalid debug info when a debug value is
45
; salvaged during LSR by adding additional location operands, then becomes

llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-salvage-0.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt -S -loop-reduce %s -o - | FileCheck %s
2+
; RUN: opt --try-experimental-debuginfo-iterators -S -loop-reduce %s -o - | FileCheck %s
23
; REQUIRES: x86-registered-target
34

45
;; Ensure that we retain debuginfo for the induction variable and dependant

llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-salvage-1.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt -S -loop-reduce %s -o - | FileCheck %s
2+
; RUN: opt --try-experimental-debuginfo-iterators -S -loop-reduce %s -o - | FileCheck %s
23
; REQUIRES: x86-registered-target
34

45
;; Ensure that we retain debuginfo for the induction variable and dependant

llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-salvage-2.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt -S -loop-reduce %s -o - | FileCheck %s
2+
; RUN: opt --try-experimental-debuginfo-iterators -S -loop-reduce %s -o - | FileCheck %s
23
; REQUIRES: x86-registered-target
34

45
;; Ensure that we retain debuginfo for the induction variable and dependant

llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-salvage-3.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt -S -loop-reduce %s -o - | FileCheck %s
2+
; RUN: opt --try-experimental-debuginfo-iterators -S -loop-reduce %s -o - | FileCheck %s
23
; REQUIRES: x86-registered-target
34

45
;; Ensure that we retain debuginfo for the induction variable and dependant

llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-salvage-4.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt -S -loop-reduce %s -o - | FileCheck %s
2+
; RUN: opt --try-experimental-debuginfo-iterators -S -loop-reduce %s -o - | FileCheck %s
23
; REQUIRES: x86-registered-target
34

45
;; Ensure that we retain debuginfo for the induction variable and dependant

llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-salvage-5.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt -S -loop-reduce %s | FileCheck %s
2+
; RUN: opt --try-experimental-debuginfo-iterators -S -loop-reduce %s | FileCheck %s
23
; REQUIRES: x86-registered-target
34

45
;; Ensure that SCEV-based salvaging in Loop Strength Reduction can salvage

llvm/test/Transforms/LoopStrengthReduce/optimizemax_debugloc.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt < %s -loop-reduce -S 2>&1 | FileCheck %s
2+
; RUN: opt --try-experimental-debuginfo-iterators < %s -loop-reduce -S 2>&1 | FileCheck %s
23
;; This test case checks that whether the new icmp instruction preserves
34
;; the debug location of the original instruction for %exitcond
45
; CHECK: icmp uge i32 %indvar.next, %n, !dbg ![[DBGLOC:[0-9]+]]

llvm/test/Transforms/LoopStrengthReduce/pr12018.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt < %s -loop-reduce
2+
; RUN: opt --try-experimental-debuginfo-iterators < %s -loop-reduce
23

34
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128"
45

llvm/test/Transforms/LoopStrengthReduce/pr51329.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt -S -loop-reduce %s | FileCheck %s
2+
; RUN: opt --try-experimental-debuginfo-iterators -S -loop-reduce %s | FileCheck %s
23
;
34
; Test that LSR SCEV-based salvaging does not crash when translating SCEVs
45
; that contain integers with binary representations greater than 64-bits.

llvm/test/Transforms/LoopStrengthReduce/pr51656.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: opt -loop-reduce -S %s | FileCheck %s
2+
; RUN: opt --try-experimental-debuginfo-iterators -loop-reduce -S %s | FileCheck %s
23

34
;; This test ensures that no attempt is made to translate long SCEVs into
45
;; DIExpressions. Attempting the translation can use excessive resources and

0 commit comments

Comments
 (0)