Don't attempt MTM heuristics without a scheduling model present.
This should fix the PPC buildbots. llvm-svn: 178558
This commit is contained in:
parent
119d3dfcba
commit
8fbfc59164
|
@ -677,6 +677,10 @@ bool EarlyIfConverter::shouldConvertIf() {
|
|||
if (Stress)
|
||||
return true;
|
||||
|
||||
// Without a scheduling model, we can't make decisions.
|
||||
if (!SchedModel->hasInstrSchedModel())
|
||||
return false;
|
||||
|
||||
if (!MinInstr)
|
||||
MinInstr = Traces->getEnsemble(MachineTraceMetrics::TS_MinInstrCount);
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
; RUN: llc < %s -x86-early-ifcvt -verify-machineinstrs
|
||||
; RUN: llc < %s -x86-early-ifcvt -stress-early-ifcvt -verify-machineinstrs
|
||||
; CPU without a scheduling model:
|
||||
; RUN: llc < %s -x86-early-ifcvt -mcpu=pentium3 -verify-machineinstrs
|
||||
;
|
||||
; Run these tests with and without -stress-early-ifcvt to exercise heuristics.
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue