diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp index f19ef6222f5..a0aaf5362b8 100644 --- a/tools/bugpoint/CrashDebugger.cpp +++ b/tools/bugpoint/CrashDebugger.cpp @@ -401,7 +401,8 @@ bool ReduceCrashingInstructions::TestInsts(std::vector for (Function::iterator FI = MI->begin(), FE = MI->end(); FI != FE; ++FI) for (BasicBlock::iterator I = FI->begin(), E = FI->end(); I != E;) { Instruction *Inst = I++; - if (!Instructions.count(Inst) && !isa(Inst)) { + if (!Instructions.count(Inst) && !isa(Inst) && + !isa(Inst)) { if (!Inst->getType()->isVoidTy()) Inst->replaceAllUsesWith(UndefValue::get(Inst->getType())); Inst->eraseFromParent(); @@ -574,6 +575,9 @@ static bool DebugACrash(BugDriver &BD, } else { if (BugpointIsInterrupted) goto ExitLoops; + if (isa(I)) + continue; + outs() << "Checking instruction: " << *I; Module *M = BD.deleteInstructionFromProgram(I, Simplification);