diff --git a/llvm/tools/bugpoint/CrashDebugger.cpp b/llvm/tools/bugpoint/CrashDebugger.cpp --- a/llvm/tools/bugpoint/CrashDebugger.cpp +++ b/llvm/tools/bugpoint/CrashDebugger.cpp @@ -1377,7 +1377,7 @@ outs() << "\n*** Debugging optimizer crash!\n"; // Reduce the list of passes which causes the optimizer to crash... - if (!BugpointIsInterrupted && !DontReducePassList) { + if (!BugpointIsInterrupted && !DontReducePassList && PassesToRun.size() > 1) { Expected Result = ReducePassList(*this).reduceList(PassesToRun); if (Error E = Result.takeError()) return E; @@ -1390,7 +1390,7 @@ EmitProgressBitcode(*Program, ID); auto Res = DebugACrash(*this, TestForOptimizerCrash); - if (Res || DontReducePassList) + if (Res || DontReducePassList || PassesToRun.size() == 1) return Res; // Try to reduce the pass list again. This covers additional cases // we failed to reduce earlier, because of more complex pass dependencies