diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-17 19:07:59 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-17 19:07:59 +0000 |
commit | 8c3b87cf19df5631125254784d57446b80e12397 (patch) | |
tree | d50a2ceb9c7b4f4afe5ad7efd4039266b20d2240 | |
parent | d9f0ff56a1878347fe5a0f162ef8c2ef2b63aeb5 (diff) | |
download | external_llvm-8c3b87cf19df5631125254784d57446b80e12397.zip external_llvm-8c3b87cf19df5631125254784d57446b80e12397.tar.gz external_llvm-8c3b87cf19df5631125254784d57446b80e12397.tar.bz2 |
Fix ARMBaseInstrInfo::getInstrLatency for calls.
Calls always clobber CPSR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150831 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMBaseInstrInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index 2d7df09..166b248 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -2849,7 +2849,7 @@ int ARMBaseInstrInfo::getInstrLatency(const InstrItineraryData *ItinData, const MCInstrDesc &MCID = MI->getDesc(); unsigned Class = MCID.getSchedClass(); unsigned UOps = ItinData->Itineraries[Class].NumMicroOps; - if (PredCost && MCID.hasImplicitDefOfPhysReg(ARM::CPSR)) + if (PredCost && (MCID.isCall() || MCID.hasImplicitDefOfPhysReg(ARM::CPSR))) // When predicated, CPSR is an additional source operand for CPSR updating // instructions, this apparently increases their latencies. *PredCost = 1; |