Skip to content

Commit f13e865

Browse files
author
git apple-llvm automerger
committed
Merge commit '43a46f1c0938' from llvm.org/master into apple/master
2 parents 82e793a + 43a46f1 commit f13e865

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

llvm/tools/bugpoint/CrashDebugger.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,21 @@ Error BugDriver::debugOptimizerCrash(const std::string &ID) {
12891289

12901290
EmitProgressBitcode(*Program, ID);
12911291

1292-
return DebugACrash(*this, TestForOptimizerCrash);
1292+
auto Res = DebugACrash(*this, TestForOptimizerCrash);
1293+
if (Res || DontReducePassList)
1294+
return Res;
1295+
// Try to reduce the pass list again. This covers additional cases
1296+
// we failed to reduce earlier, because of more complex pass dependencies
1297+
// triggering the crash.
1298+
auto SecondRes = ReducePassList(*this).reduceList(PassesToRun);
1299+
if (Error E = SecondRes.takeError())
1300+
return E;
1301+
outs() << "\n*** Found crashing pass"
1302+
<< (PassesToRun.size() == 1 ? ": " : "es: ")
1303+
<< getPassesString(PassesToRun) << '\n';
1304+
1305+
EmitProgressBitcode(getProgram(), "reduced-simplified");
1306+
return Res;
12931307
}
12941308

12951309
static bool TestForCodeGenCrash(const BugDriver &BD, Module *M) {

0 commit comments

Comments
 (0)