Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index 0041da25bf31e00b18b135849e1ddf97c1f2390d..294caf89e87f13b99983a93963315c9635988de1 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -1233,7 +1233,9 @@ struct InstructionSelectionPhase { |
data->info()->is_source_positions_enabled() |
? InstructionSelector::kAllSourcePositions |
: InstructionSelector::kCallSourcePositions); |
- selector.SelectInstructions(); |
+ if (!selector.SelectInstructions()) { |
+ data->set_compilation_failed(); |
+ } |
} |
}; |
@@ -1754,6 +1756,11 @@ bool PipelineImpl::ScheduleAndSelectInstructions(Linkage* linkage) { |
data->InitializeFrameData(call_descriptor); |
// Select and schedule instructions covering the scheduled graph. |
Run<InstructionSelectionPhase>(linkage); |
+ if (data->compilation_failed()) { |
+ info()->AbortOptimization(kCodeGenerationFailed); |
+ data->EndPhaseKind(); |
+ return false; |
+ } |
if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { |
AllowHandleDereference allow_deref; |