mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
ARM getOperandLatency should return -1 for unknown, consistent with API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158162 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ed7a51e692
commit
f377071bf8
@ -2574,8 +2574,9 @@ ARMBaseInstrInfo::getOperandLatency(const InstrItineraryData *ItinData,
|
||||
DefMI->isRegSequence() || DefMI->isImplicitDef()) {
|
||||
return 1;
|
||||
}
|
||||
// No operand latency. The caller may fall back to getInstrLatency.
|
||||
if (!ItinData || ItinData->isEmpty())
|
||||
return DefMI->mayLoad() ? 3 : 1;
|
||||
return -1;
|
||||
|
||||
const MCInstrDesc *DefMCID = &DefMI->getDesc();
|
||||
const MCInstrDesc *UseMCID = &UseMI->getDesc();
|
||||
@ -3057,6 +3058,8 @@ hasHighOperandLatency(const InstrItineraryData *ItinData,
|
||||
|
||||
// Hoist VFP / NEON instructions with 4 or higher latency.
|
||||
int Latency = getOperandLatency(ItinData, DefMI, DefIdx, UseMI, UseIdx);
|
||||
if (Latency < 0)
|
||||
Latency = getInstrLatency(ItinData, DefMI);
|
||||
if (Latency <= 3)
|
||||
return false;
|
||||
return DDomain == ARMII::DomainVFP || DDomain == ARMII::DomainNEON ||
|
||||
|
Loading…
Reference in New Issue
Block a user