We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1ab54e commit 0d44deaCopy full SHA for 0d44dea
llvm/lib/CodeGen/BranchFolding.cpp
@@ -2091,12 +2091,14 @@ bool BranchFolder::HoistCommonCodeInSuccs(MachineBasicBlock *MBB) {
2091
2092
// Get the next non-meta instruction in FBB.
2093
FI = skipDebugInstructionsForward(FI, FE, false);
2094
- assert(FI != FE && "Expected non-debug lockstep");
+ assert(TI->isIdenticalTo(*FI, MachineInstr::CheckKillDead) &&
2095
+ "Expected non-debug lockstep");
2096
2097
// Merge debug locs on hoisted instructions.
2098
TI->setDebugLoc(
2099
DILocation::getMergedLocation(TI->getDebugLoc(), FI->getDebugLoc()));
2100
TI->moveBefore(&*Loc);
2101
+ ++FI;
2102
}
2103
2104
FBB->erase(FBB->begin(), FIB);
0 commit comments