aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMBaseInstrInfo.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-02-17 19:07:59 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-02-17 19:07:59 +0000
commit8c3b87cf19df5631125254784d57446b80e12397 (patch)
treed50a2ceb9c7b4f4afe5ad7efd4039266b20d2240 /lib/Target/ARM/ARMBaseInstrInfo.cpp
parentd9f0ff56a1878347fe5a0f162ef8c2ef2b63aeb5 (diff)
downloadexternal_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
Diffstat (limited to 'lib/Target/ARM/ARMBaseInstrInfo.cpp')
-rw-r--r--lib/Target/ARM/ARMBaseInstrInfo.cpp2
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;