[llvm-commits] [llvm] r117192 - /llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
Evan Cheng
evan.cheng at apple.com
Fri Oct 22 19:04:38 PDT 2010
Author: evancheng
Date: Fri Oct 22 21:04:38 2010
New Revision: 117192
URL: http://llvm.org/viewvc/llvm-project?rev=117192&view=rev
Log:
Latency between CPSR def and branch is zero.
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=117192&r1=117191&r2=117192&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp Fri Oct 22 21:04:38 2010
@@ -1892,7 +1892,13 @@
if (!ItinData || ItinData->isEmpty())
return DefTID.mayLoad() ? 3 : 1;
+
const TargetInstrDesc &UseTID = UseMI->getDesc();
+ const MachineOperand &DefMO = DefMI->getOperand(DefIdx);
+ if (DefMO.getReg() == ARM::CPSR && UseTID.isBranch())
+ // CPSR set and branch can be paired in the same cycle.
+ return 0;
+
unsigned DefAlign = DefMI->hasOneMemOperand()
? (*DefMI->memoperands_begin())->getAlignment() : 0;
unsigned UseAlign = UseMI->hasOneMemOperand()
More information about the llvm-commits
mailing list