Skip to content

Commit 5ef64bb

Browse files
committed
[globalisel][legalizer] Include newly-dead code in artifact combine checks for DebugLoc loss
This dead code deletion is part of the combine and the combine results should account for their locations.
1 parent 7f7f98b commit 5ef64bb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/CodeGen/GlobalISel/Legalizer.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,14 @@ Legalizer::legalizeMachineFunction(MachineFunction &MF, const LegalizerInfo &LI,
283283
if (ArtCombiner.tryCombineInstruction(MI, DeadInstructions,
284284
WrapperObserver)) {
285285
WorkListObserver.printNewInstrs();
286-
LocObserver.checkpoint(
287-
VerifyDebugLocs ==
288-
DebugLocVerifyLevel::LegalizationsAndArtifactCombiners);
289286
for (auto *DeadMI : DeadInstructions) {
290287
LLVM_DEBUG(dbgs() << *DeadMI << "Is dead\n");
291288
RemoveDeadInstFromLists(DeadMI);
292289
DeadMI->eraseFromParentAndMarkDBGValuesForRemoval();
293290
}
294-
LocObserver.checkpoint();
291+
LocObserver.checkpoint(
292+
VerifyDebugLocs ==
293+
DebugLocVerifyLevel::LegalizationsAndArtifactCombiners);
295294
Changed = true;
296295
continue;
297296
}

0 commit comments

Comments
 (0)