aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Tozer <stephen.tozer@sony.com>2024-01-23 14:27:01 +0000
committerGitHub <noreply@github.com>2024-01-23 14:27:01 +0000
commit30845e8ab46c416a2e333eb84239e9ec71e92617 (patch)
tree6e2097d43c245763a3e7219dd623913634975977
parent818f13fc00bb29df98d730dca6561014db1d4e26 (diff)
downloadllvm-30845e8ab46c416a2e333eb84239e9ec71e92617.zip
llvm-30845e8ab46c416a2e333eb84239e9ec71e92617.tar.gz
llvm-30845e8ab46c416a2e333eb84239e9ec71e92617.tar.bz2
[RemoveDIs][DebugInfo] Handle DPVAssigns in Assignment Tracking excluding lowering (#78982)
This patch adds support for DPVAssigns across all of AssignmentTrackingAnalysis except for AssignmentTrackingLowering, which is implemented in a separate patch. This patch includes handling DPValues in MemLocFragFill, the removal of redundant DPValues as part of AssignmentTrackingAnalysis (which is different to the version in `BasicBlockUtils.cpp`), and preventing the DPVAssigns from being directly emitted in SelectionDAG (just as we don't emit llvm.dbg.assigns directly, but receive a set of locations from AssignmentTrackingAnalysis' output).
-rw-r--r--llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp280
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp5
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/AArch64/scalable-vectors.ll3
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/assignment-tracking-not-enabled.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/coalesce-cfg.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/dbg-phi-produces-undef.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/frag-size-zero.ll3
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/global-storage.ll3
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/large-type.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll3
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll11
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill-cfg.ll10
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill.ll10
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/negative-offset.ll3
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/no-redundant-def-after-alloca.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-bwd-scan.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-to-prevent-reordering.ll9
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll9
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/sdag-ir-salvage-assign.ll11
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll9
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location-2.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-extra-checks.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-outside-variable.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def-2.ll4
-rw-r--r--llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def.ll4
38 files changed, 338 insertions, 127 deletions
diff --git a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
index a558a30..f8ce8f9 100644
--- a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -829,6 +829,13 @@ class MemLocFragmentFill {
void process(BasicBlock &BB, VarFragMap &LiveSet) {
BBInsertBeforeMap[&BB].clear();
for (auto &I : BB) {
+ for (auto &DPV : I.getDbgValueRange()) {
+ if (const auto *Locs = FnVarLocs->getWedge(&DPV)) {
+ for (const VarLocInfo &Loc : *Locs) {
+ addDef(Loc, &DPV, *I.getParent(), LiveSet);
+ }
+ }
+ }
if (const auto *Locs = FnVarLocs->getWedge(&I)) {
for (const VarLocInfo &Loc : *Locs) {
addDef(Loc, &I, *I.getParent(), LiveSet);
@@ -2487,73 +2494,78 @@ removeRedundantDbgLocsUsingBackwardScan(const BasicBlock *BB,
VariableDefinedBytes.clear();
}
- // Get the location defs that start just before this instruction.
- const auto *Locs = FnVarLocs.getWedge(&I);
- if (!Locs)
- continue;
+ auto HandleLocsForWedge = [&](auto *WedgePosition) {
+ // Get the location defs that start just before this instruction.
+ const auto *Locs = FnVarLocs.getWedge(WedgePosition);
+ if (!Locs)
+ return;
+
+ NumWedgesScanned++;
+ bool ChangedThisWedge = false;
+ // The new pruned set of defs, reversed because we're scanning backwards.
+ SmallVector<VarLocInfo> NewDefsReversed;
+
+ // Iterate over the existing defs in reverse.
+ for (auto RIt = Locs->rbegin(), REnd = Locs->rend(); RIt != REnd; ++RIt) {
+ NumDefsScanned++;
+ DebugAggregate Aggr =
+ getAggregate(FnVarLocs.getVariable(RIt->VariableID));
+ uint64_t SizeInBits = Aggr.first->getSizeInBits().value_or(0);
+ uint64_t SizeInBytes = divideCeil(SizeInBits, 8);
+
+ // Cutoff for large variables to prevent expensive bitvector operations.
+ const uint64_t MaxSizeBytes = 2048;
+
+ if (SizeInBytes == 0 || SizeInBytes > MaxSizeBytes) {
+ // If the size is unknown (0) then keep this location def to be safe.
+ // Do the same for defs of large variables, which would be expensive
+ // to represent with a BitVector.
+ NewDefsReversed.push_back(*RIt);
+ continue;
+ }
- NumWedgesScanned++;
- bool ChangedThisWedge = false;
- // The new pruned set of defs, reversed because we're scanning backwards.
- SmallVector<VarLocInfo> NewDefsReversed;
-
- // Iterate over the existing defs in reverse.
- for (auto RIt = Locs->rbegin(), REnd = Locs->rend(); RIt != REnd; ++RIt) {
- NumDefsScanned++;
- DebugAggregate Aggr =
- getAggregate(FnVarLocs.getVariable(RIt->VariableID));
- uint64_t SizeInBits = Aggr.first->getSizeInBits().value_or(0);
- uint64_t SizeInBytes = divideCeil(SizeInBits, 8);
-
- // Cutoff for large variables to prevent expensive bitvector operations.
- const uint64_t MaxSizeBytes = 2048;
-
- if (SizeInBytes == 0 || SizeInBytes > MaxSizeBytes) {
- // If the size is unknown (0) then keep this location def to be safe.
- // Do the same for defs of large variables, which would be expensive
- // to represent with a BitVector.
- NewDefsReversed.push_back(*RIt);
- continue;
- }
+ // Only keep this location definition if it is not fully eclipsed by
+ // other definitions in this wedge that come after it
+
+ // Inert the bytes the location definition defines.
+ auto InsertResult =
+ VariableDefinedBytes.try_emplace(Aggr, BitVector(SizeInBytes));
+ bool FirstDefinition = InsertResult.second;
+ BitVector &DefinedBytes = InsertResult.first->second;
+
+ DIExpression::FragmentInfo Fragment =
+ RIt->Expr->getFragmentInfo().value_or(
+ DIExpression::FragmentInfo(SizeInBits, 0));
+ bool InvalidFragment = Fragment.endInBits() > SizeInBits;
+ uint64_t StartInBytes = Fragment.startInBits() / 8;
+ uint64_t EndInBytes = divideCeil(Fragment.endInBits(), 8);
+
+ // If this defines any previously undefined bytes, keep it.
+ if (FirstDefinition || InvalidFragment ||
+ DefinedBytes.find_first_unset_in(StartInBytes, EndInBytes) != -1) {
+ if (!InvalidFragment)
+ DefinedBytes.set(StartInBytes, EndInBytes);
+ NewDefsReversed.push_back(*RIt);
+ continue;
+ }
- // Only keep this location definition if it is not fully eclipsed by
- // other definitions in this wedge that come after it
-
- // Inert the bytes the location definition defines.
- auto InsertResult =
- VariableDefinedBytes.try_emplace(Aggr, BitVector(SizeInBytes));
- bool FirstDefinition = InsertResult.second;
- BitVector &DefinedBytes = InsertResult.first->second;
-
- DIExpression::FragmentInfo Fragment =
- RIt->Expr->getFragmentInfo().value_or(
- DIExpression::FragmentInfo(SizeInBits, 0));
- bool InvalidFragment = Fragment.endInBits() > SizeInBits;
- uint64_t StartInBytes = Fragment.startInBits() / 8;
- uint64_t EndInBytes = divideCeil(Fragment.endInBits(), 8);
-
- // If this defines any previously undefined bytes, keep it.
- if (FirstDefinition || InvalidFragment ||
- DefinedBytes.find_first_unset_in(StartInBytes, EndInBytes) != -1) {
- if (!InvalidFragment)
- DefinedBytes.set(StartInBytes, EndInBytes);
- NewDefsReversed.push_back(*RIt);
- continue;
+ // Redundant def found: throw it away. Since the wedge of defs is being
+ // rebuilt, doing nothing is the same as deleting an entry.
+ ChangedThisWedge = true;
+ NumDefsRemoved++;
}
- // Redundant def found: throw it away. Since the wedge of defs is being
- // rebuilt, doing nothing is the same as deleting an entry.
- ChangedThisWedge = true;
- NumDefsRemoved++;
- }
-
- // Un-reverse the defs and replace the wedge with the pruned version.
- if (ChangedThisWedge) {
- std::reverse(NewDefsReversed.begin(), NewDefsReversed.end());
- FnVarLocs.setWedge(&I, std::move(NewDefsReversed));
- NumWedgesChanged++;
- Changed = true;
- }
+ // Un-reverse the defs and replace the wedge with the pruned version.
+ if (ChangedThisWedge) {
+ std::reverse(NewDefsReversed.begin(), NewDefsReversed.end());
+ FnVarLocs.setWedge(WedgePosition, std::move(NewDefsReversed));
+ NumWedgesChanged++;
+ Changed = true;
+ }
+ };
+ HandleLocsForWedge(&I);
+ for (DPValue &DPV : reverse(I.getDbgValueRange()))
+ HandleLocsForWedge(&DPV);
}
return Changed;
@@ -2578,42 +2590,48 @@ removeRedundantDbgLocsUsingForwardScan(const BasicBlock *BB,
// instructions.
for (const Instruction &I : *BB) {
// Get the defs that come just before this instruction.
- const auto *Locs = FnVarLocs.getWedge(&I);
- if (!Locs)
- continue;
-
- NumWedgesScanned++;
- bool ChangedThisWedge = false;
- // The new pruned set of defs.
- SmallVector<VarLocInfo> NewDefs;
+ auto HandleLocsForWedge = [&](auto *WedgePosition) {
+ const auto *Locs = FnVarLocs.getWedge(WedgePosition);
+ if (!Locs)
+ return;
+
+ NumWedgesScanned++;
+ bool ChangedThisWedge = false;
+ // The new pruned set of defs.
+ SmallVector<VarLocInfo> NewDefs;
+
+ // Iterate over the existing defs.
+ for (const VarLocInfo &Loc : *Locs) {
+ NumDefsScanned++;
+ DebugVariable Key(FnVarLocs.getVariable(Loc.VariableID).getVariable(),
+ std::nullopt, Loc.DL.getInlinedAt());
+ auto VMI = VariableMap.find(Key);
+
+ // Update the map if we found a new value/expression describing the
+ // variable, or if the variable wasn't mapped already.
+ if (VMI == VariableMap.end() || VMI->second.first != Loc.Values ||
+ VMI->second.second != Loc.Expr) {
+ VariableMap[Key] = {Loc.Values, Loc.Expr};
+ NewDefs.push_back(Loc);
+ continue;
+ }
- // Iterate over the existing defs.
- for (const VarLocInfo &Loc : *Locs) {
- NumDefsScanned++;
- DebugVariable Key(FnVarLocs.getVariable(Loc.VariableID).getVariable(),
- std::nullopt, Loc.DL.getInlinedAt());
- auto VMI = VariableMap.find(Key);
-
- // Update the map if we found a new value/expression describing the
- // variable, or if the variable wasn't mapped already.
- if (VMI == VariableMap.end() || VMI->second.first != Loc.Values ||
- VMI->second.second != Loc.Expr) {
- VariableMap[Key] = {Loc.Values, Loc.Expr};
- NewDefs.push_back(Loc);
- continue;
+ // Did not insert this Loc, which is the same as removing it.
+ ChangedThisWedge = true;
+ NumDefsRemoved++;
}
- // Did not insert this Loc, which is the same as removing it.
- ChangedThisWedge = true;
- NumDefsRemoved++;
- }
+ // Replace the existing wedge with the pruned version.
+ if (ChangedThisWedge) {
+ FnVarLocs.setWedge(WedgePosition, std::move(NewDefs));
+ NumWedgesChanged++;
+ Changed = true;
+ }
+ };
- // Replace the existing wedge with the pruned version.
- if (ChangedThisWedge) {
- FnVarLocs.setWedge(&I, std::move(NewDefs));
- NumWedgesChanged++;
- Changed = true;
- }
+ for (DPValue &DPV : I.getDbgValueRange())
+ HandleLocsForWedge(&DPV);
+ HandleLocsForWedge(&I);
}
return Changed;
@@ -2660,41 +2678,46 @@ removeUndefDbgLocsFromEntryBlock(const BasicBlock *BB,
// instructions.
for (const Instruction &I : *BB) {
// Get the defs that come just before this instruction.
- const auto *Locs = FnVarLocs.getWedge(&I);
- if (!Locs)
- continue;
-
- NumWedgesScanned++;
- bool ChangedThisWedge = false;
- // The new pruned set of defs.
- SmallVector<VarLocInfo> NewDefs;
-
- // Iterate over the existing defs.
- for (const VarLocInfo &Loc : *Locs) {
- NumDefsScanned++;
- DebugAggregate Aggr{FnVarLocs.getVariable(Loc.VariableID).getVariable(),
- Loc.DL.getInlinedAt()};
- DebugVariable Var = FnVarLocs.getVariable(Loc.VariableID);
+ auto HandleLocsForWedge = [&](auto *WedgePosition) {
+ const auto *Locs = FnVarLocs.getWedge(WedgePosition);
+ if (!Locs)
+ return;
+
+ NumWedgesScanned++;
+ bool ChangedThisWedge = false;
+ // The new pruned set of defs.
+ SmallVector<VarLocInfo> NewDefs;
+
+ // Iterate over the existing defs.
+ for (const VarLocInfo &Loc : *Locs) {
+ NumDefsScanned++;
+ DebugAggregate Aggr{FnVarLocs.getVariable(Loc.VariableID).getVariable(),
+ Loc.DL.getInlinedAt()};
+ DebugVariable Var = FnVarLocs.getVariable(Loc.VariableID);
+
+ // Remove undef entries that are encountered before any non-undef
+ // intrinsics from the entry block.
+ if (Loc.Values.isKillLocation(Loc.Expr) && !HasDefinedBits(Aggr, Var)) {
+ // Did not insert this Loc, which is the same as removing it.
+ NumDefsRemoved++;
+ ChangedThisWedge = true;
+ continue;
+ }
- // Remove undef entries that are encountered before any non-undef
- // intrinsics from the entry block.
- if (Loc.Values.isKillLocation(Loc.Expr) && !HasDefinedBits(Aggr, Var)) {
- // Did not insert this Loc, which is the same as removing it.
- NumDefsRemoved++;
- ChangedThisWedge = true;
- continue;
+ DefineBits(Aggr, Var);
+ NewDefs.push_back(Loc);
}
- DefineBits(Aggr, Var);
- NewDefs.push_back(Loc);
- }
-
- // Replace the existing wedge with the pruned version.
- if (ChangedThisWedge) {
- FnVarLocs.setWedge(&I, std::move(NewDefs));
- NumWedgesChanged++;
- Changed = true;
- }
+ // Replace the existing wedge with the pruned version.
+ if (ChangedThisWedge) {
+ FnVarLocs.setWedge(WedgePosition, std::move(NewDefs));
+ NumWedgesChanged++;
+ Changed = true;
+ }
+ };
+ for (DPValue &DPV : I.getDbgValueRange())
+ HandleLocsForWedge(&DPV);
+ HandleLocsForWedge(&I);
}
return Changed;
@@ -2726,6 +2749,9 @@ static DenseSet<DebugAggregate> findVarsWithStackSlot(Function &Fn) {
for (DbgAssignIntrinsic *DAI : at::getAssignmentMarkers(&I)) {
Result.insert({DAI->getVariable(), DAI->getDebugLoc().getInlinedAt()});
}
+ for (DPValue *DPV : at::getDPVAssignmentMarkers(&I)) {
+ Result.insert({DPV->getVariable(), DPV->getDebugLoc().getInlinedAt()});
+ }
}
}
return Result;
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index a7dd23f..5ce1013 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -1241,6 +1241,11 @@ void SelectionDAGBuilder::visitDbgInfo(const Instruction &I) {
It->Expr, Vals.size() > 1, It->DL, SDNodeOrder);
}
}
+ // We must early-exit here to prevent any DPValues from being emitted below,
+ // as we have just emitted the debug values resulting from assignment
+ // tracking analysis, making any existing DPValues redundant (and probably
+ // less correct).
+ return;
}
// Is there is any debug-info attached to this instruction, in the form of
diff --git a/llvm/test/DebugInfo/assignment-tracking/AArch64/scalable-vectors.ll b/llvm/test/DebugInfo/assignment-tracking/AArch64/scalable-vectors.ll
index 4f3db53..81a1542 100644
--- a/llvm/test/DebugInfo/assignment-tracking/AArch64/scalable-vectors.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/AArch64/scalable-vectors.ll
@@ -1,5 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - | FileCheck %s
+
;; Hand written. Check AssignmentTrackingAnalysis doesn't try to get the size
;; of scalable vectors (which causes an assertion failure).
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll b/llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll
index 057c82b0..57bb53d 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/DSE.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-before=finalize-isel -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before=finalize-isel -o - \
+; RUN: | FileCheck %s
+
; Check basic lowering behaviour of dbg.assign intrinsics. The first
; assignment to `local`, which has been DSE'd, should be represented with a
; constant value DBG_VALUE. The second assignment should have a DBG_VALUE
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/assignment-tracking-not-enabled.ll b/llvm/test/DebugInfo/assignment-tracking/X86/assignment-tracking-not-enabled.ll
index 73b4fd0..2f0b4fd 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/assignment-tracking-not-enabled.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/assignment-tracking-not-enabled.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Check that SelectionDAG downgrades dbg.assigns to dbg.values if assignment
;; tracking isn't enabled (e.g. if the module flag
;; "debug-info-assignment-tracking" is missing / false).
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/coalesce-cfg.ll b/llvm/test/DebugInfo/assignment-tracking/X86/coalesce-cfg.ll
index 49fbcb9..5c0d24e 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/coalesce-cfg.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/coalesce-cfg.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -o - -stop-after=finalize-isel \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -o - -stop-after=finalize-isel \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Test coalescing of contiguous fragments in adjacent location definitions.
;; Further details and check directives inline.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/dbg-phi-produces-undef.ll b/llvm/test/DebugInfo/assignment-tracking/X86/dbg-phi-produces-undef.ll
index 37a2dbd..2ab4e57 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/dbg-phi-produces-undef.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/dbg-phi-produces-undef.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s
+
;; Hand written test because the scenario is unlikely. Check that the "value"
;; of a debug def PHIs is "undef" (because we don't actually track PHIs).
;;
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll
index b4e84a9..07d0540 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-1.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s
+
;; cat test.cpp
;; void d();
;; void e();
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll
index 1526b34..2dd82ff 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-2.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s
+
;; Same as diamond-1.ll except that the DIAssignID attached to the store has
;; been deleted. In this case, we expect the same output as for diamond-1.ll
;; because we choose to interpret stores to stack slots that don't link to
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll
index b20b166..69ae720 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/diamond-3.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Hand written to test scenario we can definitely run into in the wild. This
;; file name includes "diamond" because the idea is that we lose (while
;; optimizing) one of the diamond branches which was empty except for a debug
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/frag-size-zero.ll b/llvm/test/DebugInfo/assignment-tracking/X86/frag-size-zero.ll
index 3a3865d..c6124df 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/frag-size-zero.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/frag-size-zero.ll
@@ -1,5 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - | FileCheck %s
+
;; Check that a zero-sized fragment (the final dbg.assign) is ignored by
;; AssignmentTrackingAnalysis.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/global-storage.ll b/llvm/test/DebugInfo/assignment-tracking/X86/global-storage.ll
index 7d265ac..d7b8d76 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/global-storage.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/global-storage.ll
@@ -1,5 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - | FileCheck %s
+
;; Local variable has global storage. Check AssignmentTrackingAnalysis doesn't
;; crash/assert.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/large-type.ll b/llvm/test/DebugInfo/assignment-tracking/X86/large-type.ll
index cebbc16..9ab0f36 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/large-type.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/large-type.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Based on optimized IR from C source:
;; int main () {
;; char a1[__INT_MAX__];
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll b/llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll
index 559cdc5..c83d530 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/loop-hoist.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; $ cat test.cpp
;; int d();
;; void e();
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll b/llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll
index fcd5196..77d730f 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/loop-sink.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG
+
;; Tiny loop with a store sunk out of it:
;; void e();
;; void es(int*);
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll b/llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll
index 5ef5cb4..51661d4 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/loop-unroll.ll
@@ -1,5 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s
;;
;; Backend counterpart to ../Generic/dbg-assign-loop-unroll. This IR was
;; generated by running `opt -loop-unroll -S` on the IR in that test.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll b/llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll
index b4d8595..2d0bf28 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/lower-offset-expression.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s
+
;; Handwritten test.
;; Here we have dbg.assign intrinsics with fragments (in the value-expression)
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll b/llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll
index 859056a..28195bc 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/lower-to-value.ll
@@ -2,11 +2,22 @@
; RUN: -experimental-debug-variable-locations=false \
; RUN: -debug-ata-coalesce-frags=true \
; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE --implicit-check-not=DBG_VALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=false \
+; RUN: -debug-ata-coalesce-frags=true \
+; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE --implicit-check-not=DBG_VALUE
; RUN: llc %s -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF --implicit-check-not=DBG_VALUE \
; RUN: --implicit-check-not=DBG_INSTR_REF
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=true \
+; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF --implicit-check-not=DBG_VALUE \
+; RUN: --implicit-check-not=DBG_INSTR_REF
+
;; Check that dbg.assigns for an aggregate variable which lives on the stack
;; for some of its lifetime are lowered into an appropriate set of DBG_VALUEs.
;;
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill-cfg.ll b/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill-cfg.ll
index 0ea8373..0211fb7 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill-cfg.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill-cfg.ll
@@ -2,10 +2,20 @@
; RUN: -experimental-debug-variable-locations=false \
; RUN: -debug-ata-coalesce-frags=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=false \
+; RUN: -debug-ata-coalesce-frags=true \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
; RUN: llc %s -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=true \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Check that the mem-loc-frag-fill pseudo-pass works on a simple CFG. When
;; LLVM sees a dbg.value with an overlapping fragment it essentially considers
;; the previous location as valid for all bits in that fragment. The pass
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill.ll b/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill.ll
index 6306781..597531a 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/mem-loc-frag-fill.ll
@@ -2,10 +2,20 @@
; RUN: -experimental-debug-variable-locations=false \
; RUN: -debug-ata-coalesce-frags=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=false \
+; RUN: -debug-ata-coalesce-frags=true \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
; RUN: llc %s -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=true \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Check that the mem-loc-frag-fill analysis works on a simple case; ensure
;; that location definitions are added to preserve memory locations of
;; fragments of variables at subsequent location definitions for other
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/negative-offset.ll b/llvm/test/DebugInfo/assignment-tracking/X86/negative-offset.ll
index 74486c4..20ea85b 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/negative-offset.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/negative-offset.ll
@@ -1,5 +1,8 @@
; RUN: llc %s -stop-after=finalize-isel -o - | FileCheck %s --implicit-check-not=DBG_VALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - | FileCheck %s --implicit-check-not=DBG_VALUE
+
;; Check stores to an address computed as a negative offset from an alloca are
;; ignored by the assignment tracking analysis. For this example that should
;; result in no DBG_VALUEs in the while.body.lr.ph branch.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll
index 6e066fa..39132dd 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-frags.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG
+
;; Test a variety of block inputs and lattice configurations for the assignment
;; tracking analysis (debug-ata). This is similar to nested-loop.ll and
;; nested-loop-sroa.ll except that the allocas are 64 bits and the stores are a
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll
index 1f4351e..39c9172 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop-sroa.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG
+
;; Test a variety of block inputs and lattice configurations for the assignment
;; tracking analysis (debug-ata). This is the same as nested-loop.ll except each
;; alloca holds a fragment of a variable instead of a whole variable.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll
index 3f4350f..b88a585 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/nested-loop.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG
+
;; Test a variety of block inputs and lattice configurations for the assignment
;; tracking analysis (debug-ata).
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/no-redundant-def-after-alloca.ll b/llvm/test/DebugInfo/assignment-tracking/X86/no-redundant-def-after-alloca.ll
index 626757e..9ef3ea5 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/no-redundant-def-after-alloca.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/no-redundant-def-after-alloca.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -o - -stop-after=finalize-isel \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -o - -stop-after=finalize-isel \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Hand written. Check that no unnecessary undef is inserted after an alloca
;; that has a linked dbg.assign that doesn't immediately follow it.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll b/llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll
index 191d613..9b8f3b9 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/order-of-defs.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Ensure that the order of several debug intrinsics between non-debug
;; instructions is maintained.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-bwd-scan.ll b/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-bwd-scan.ll
index dc2638c..211098b 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-bwd-scan.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-bwd-scan.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Hand-written to test assignment tracking analysis' removal of redundant
;; debug loc definitions. Checks written inline.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-to-prevent-reordering.ll b/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-to-prevent-reordering.ll
index b0628ae..5d52cc3 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-to-prevent-reordering.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/remove-redundant-defs-to-prevent-reordering.ll
@@ -1,10 +1,19 @@
; RUN: llc %s -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=false \
; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE --implicit-check-not="DBG_VALUE \$noreg"
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=false \
+; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE --implicit-check-not="DBG_VALUE \$noreg"
; RUN: llc %s -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF --implicit-check-not="DBG_VALUE \$noreg"
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=true \
+; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF --implicit-check-not="DBG_VALUE \$noreg"
+
;; Found in the wild, but this test involves modifications from:
;; int b;
;; void ext();
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll
index fc05d39..ba7d3f6 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-dangling-dbgassign.ll
@@ -1,10 +1,19 @@
; RUN: llc %s -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=false \
; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=false \
+; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE
; RUN: llc %s -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=true \
+; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF
+
;--------------------------------------------------------------------
; Adapted from sdag-dangling-dbgvalue.ll to test dbg.assign intrinsics. This
; ensures that dbg.assigns with no linked store are treated as dbg.values. For
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-ir-salvage-assign.ll b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-ir-salvage-assign.ll
index 57a88bc..38a0a86 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-ir-salvage-assign.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-ir-salvage-assign.ll
@@ -2,11 +2,22 @@
; RUN: -stop-before finalize-isel %s -o - \
; RUN: -experimental-debug-variable-locations=false \
; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators -mtriple=x86_64-unknown-unknown -start-after=codegenprepare \
+; RUN: -stop-before finalize-isel %s -o - \
+; RUN: -experimental-debug-variable-locations=false \
+; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE
; RUN: llc -mtriple=x86_64-unknown-unknown -start-after=codegenprepare \
; RUN: -stop-before finalize-isel %s -o - \
; RUN: -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF
+
+; RUN: llc --try-experimental-debuginfo-iterators -mtriple=x86_64-unknown-unknown -start-after=codegenprepare \
+; RUN: -stop-before finalize-isel %s -o - \
+; RUN: -experimental-debug-variable-locations=true \
+; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF
+
; Adapted from sdag-ir-salvage.ll to test dbg.assign intrinsics. This ensures
; that dbg.assigns with no linked store are treated as dbg.values.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll
index 1aea122..fba127b 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/sdag-transfer-dbgassign.ll
@@ -1,10 +1,19 @@
; RUN: llc %s -start-after=codegenprepare -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=false \
; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -start-after=codegenprepare -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=false \
+; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE
; RUN: llc %s -start-after=codegenprepare -stop-before finalize-isel -o - \
; RUN: -experimental-debug-variable-locations=true \
; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -start-after=codegenprepare -stop-before finalize-isel -o - \
+; RUN: -experimental-debug-variable-locations=true \
+; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF
+
; Adapted from sdag-transfer-dbgvalue.ll to test dbg.assign intrinsics. This
; ensures that dbg.assigns with no linked store are treated as dbg.values.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location-2.ll b/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location-2.ll
index 485ee83..1b2d047 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location-2.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location-2.ll
@@ -1,6 +1,10 @@
; RUN: llc -stop-after=finalize-isel %s -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators -stop-after=finalize-isel %s -o - \
+; RUN: | FileCheck %s
+
;; Check that a dbg.assign for a fully stack-homed variable causes the variable
;; location to appear in the Machine Function side table. Similar to
;; single-memory-location.ll except this has slightly more complicated input
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll b/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll
index 1f806e5..a9cc55d 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/single-memory-location.ll
@@ -1,6 +1,10 @@
; RUN: llc -stop-after=finalize-isel %s -o - \
; RUN: | FileCheck %s
+
+; RUN: llc --try-experimental-debuginfo-iterators -stop-after=finalize-isel %s -o - \
+; RUN: | FileCheck %s
+
;; Check that a dbg.assign for a fully stack-homed variable causes the variable
;; location to appear in the Machine Function side table (variable 'local').
;;
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll b/llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll
index 15f5374..045c9fd3 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/split-alloca.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -o - -stop-after=finalize-isel \
; RUN: | FileCheck %s --implicit-check-not=DBG
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -o - -stop-after=finalize-isel \
+; RUN: | FileCheck %s --implicit-check-not=DBG
+
;; Hand written. Check that we fall back to emitting a list of defs for
;; variables with split allocas (i.e. we want to see DBG_VALUEs and no
;; debug-info-variable entry in the stack slot table).
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-extra-checks.ll b/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-extra-checks.ll
index c407a7d..3dd9098 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-extra-checks.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-extra-checks.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Similarly to untagged-store-assignment-outside-variable.ll this test checks
;; that out of bounds stores that have no DIAssignID are interpreted correctly
;; (see inline comments and checks). Hand-written IR.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-outside-variable.ll b/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-outside-variable.ll
index 3a7c528..fe1af19 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-outside-variable.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/untagged-store-assignment-outside-variable.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_
+
;; Generated from following C source that contains UB (read and write to
;; out of bounds static array element.
;; int a;
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def-2.ll b/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def-2.ll
index ebab33f..cbe9af2 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def-2.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def-2.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_VALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_VALUE
+
;; Check that sandwiching instructions between a linked store and dbg.assign
;; results in a dbg.value(prev_value) being inserted at the store, and a
;; dbg.value(deref) at the dbg.assign.
diff --git a/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def.ll b/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def.ll
index d85784f..135123ef 100644
--- a/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def.ll
+++ b/llvm/test/DebugInfo/assignment-tracking/X86/use-known-value-at-early-mem-def.ll
@@ -1,6 +1,10 @@
; RUN: llc %s -stop-after=finalize-isel -o - \
; RUN: | FileCheck %s --implicit-check-not=DBG_VALUE
+
+; RUN: llc --try-experimental-debuginfo-iterators %s -stop-after=finalize-isel -o - \
+; RUN: | FileCheck %s --implicit-check-not=DBG_VALUE
+
;; Check that sandwiching instructions between a linked store and dbg.assign
;; results in a dbg.value(prev_value) being inserted at the store, and a
;; dbg.value(deref) at the dbg.assign.