Fix for -sched-high-latency-cycles in sched=list-ilp mode.

llvm-svn: 127071
This commit is contained in:
Andrew Trick 2011-03-05 09:18:16 +00:00
parent 5158a86fcb
commit d7f4c21684
1 changed files with 3 additions and 1 deletions

View File

@ -515,7 +515,9 @@ void ScheduleDAGSDNodes::ComputeLatency(SUnit *SU) {
}
if (!InstrItins || InstrItins->isEmpty()) {
if (SU->getNode() && TII->isHighLatencyDef(SU->getNode()->getOpcode()))
SDNode *N = SU->getNode();
if (N && N->isMachineOpcode() &&
TII->isHighLatencyDef(N->getMachineOpcode()))
SU->Latency = HighLatencyCycles;
else
SU->Latency = 1;