diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -2211,8 +2211,11 @@ if (MO->isKill()) addRegWithSubRegs(regsKilled, Reg); - // Check that LiveVars knows this kill. - if (LiveVars && Register::isVirtualRegister(Reg) && MO->isKill()) { + // Check that LiveVars knows this kill (unless we are inside a bundle, in + // which case we have already checked that LiveVars knows any kills on the + // bundle header instead). + if (LiveVars && Register::isVirtualRegister(Reg) && MO->isKill() && + !MI->isBundledWithPred()) { LiveVariables::VarInfo &VI = LiveVars->getVarInfo(Reg); if (!is_contained(VI.Kills, MI)) report("Kill missing from LiveVariables", MO, MONum); diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -1442,7 +1442,7 @@ // Explicit addition of UnreachableMachineBlockElim allows stopping before or // after it with -stop-before/-stop-after. addPass(&UnreachableMachineBlockElimID); - addPass(&LiveVariablesID, false); + addPass(&LiveVariablesID); // Edge splitting is smarter with machine loop info. addPass(&MachineLoopInfoID, false);