[llvm-commits] [llvm] r150831 - /llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Feb 17 11:07:59 PST 2012
Author: stoklund
Date: Fri Feb 17 13:07:59 2012
New Revision: 150831
URL: http://llvm.org/viewvc/llvm-project?rev=150831&view=rev
Log:
Fix ARMBaseInstrInfo::getInstrLatency for calls.
Calls always clobber CPSR.
Modified:
llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=150831&r1=150830&r2=150831&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp Fri Feb 17 13:07:59 2012
@@ -2849,7 +2849,7 @@
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;
More information about the llvm-commits
mailing list