[llvm] r297196 - Fix bugpoint to work with swifterror values

Arnold Schwaighofer via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 12:29:00 PST 2017


Author: arnolds
Date: Tue Mar  7 14:28:59 2017
New Revision: 297196

URL: http://llvm.org/viewvc/llvm-project?rev=297196&view=rev
Log:
Fix bugpoint to work with swifterror values

Modified:
    llvm/trunk/tools/bugpoint/CrashDebugger.cpp

Modified: llvm/trunk/tools/bugpoint/CrashDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/CrashDebugger.cpp?rev=297196&r1=297195&r2=297196&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/CrashDebugger.cpp (original)
+++ llvm/trunk/tools/bugpoint/CrashDebugger.cpp Tue Mar  7 14:28:59 2017
@@ -731,7 +731,8 @@ bool ReduceCrashingInstructions::TestIns
       for (BasicBlock::iterator I = FI->begin(), E = FI->end(); I != E;) {
         Instruction *Inst = &*I++;
         if (!Instructions.count(Inst) && !isa<TerminatorInst>(Inst) &&
-            !Inst->isEHPad() && !Inst->getType()->isTokenTy()) {
+            !Inst->isEHPad() && !Inst->getType()->isTokenTy() &&
+            !Inst->isSwiftError()) {
           if (!Inst->getType()->isVoidTy())
             Inst->replaceAllUsesWith(UndefValue::get(Inst->getType()));
           Inst->eraseFromParent();
@@ -1015,7 +1016,8 @@ static Error ReduceInsts(BugDriver &BD,
                 // TODO: Should this be some kind of interrupted error?
                 return Error::success();
 
-              if (I->isEHPad() || I->getType()->isTokenTy())
+              if (I->isEHPad() || I->getType()->isTokenTy() ||
+                  I->isSwiftError())
                 continue;
 
               outs() << "Checking instruction: " << *I;




More information about the llvm-commits mailing list