diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-10-29 23:16:55 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-10-29 23:16:55 +0000 |
commit | e09206d4d7683e2a421104c5cb83f7808ba4b06e (patch) | |
tree | 503339507ccfe2183cc756855119a47376314ab3 | |
parent | d179886f0595eb3564a9edfdfff79def130d89cc (diff) |
Fix fpscr <-> GPR latency info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117737 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMBaseInstrInfo.cpp | 11 | ||||
-rw-r--r-- | lib/Target/ARM/ARMScheduleA8.td | 2 | ||||
-rw-r--r-- | lib/Target/ARM/ARMScheduleA9.td | 3 |
3 files changed, 12 insertions, 4 deletions
diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index c23bc93925..d4b832e7bc 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -1914,9 +1914,16 @@ ARMBaseInstrInfo::getOperandLatency(const InstrItineraryData *ItinData, const TargetInstrDesc &UseTID = UseMI->getDesc(); const MachineOperand &DefMO = DefMI->getOperand(DefIdx); - if (DefMO.getReg() == ARM::CPSR && UseTID.isBranch()) + if (DefMO.getReg() == ARM::CPSR) { + if (DefMI->getOpcode() == ARM::FMSTAT) { + // fpscr -> cpsr stalls over 20 cycles on A8 (and earlier?) + return Subtarget.isCortexA9() ? 1 : 20; + } + // CPSR set and branch can be paired in the same cycle. - return 0; + if (UseTID.isBranch()) + return 0; + } unsigned DefAlign = DefMI->hasOneMemOperand() ? (*DefMI->memoperands_begin())->getAlignment() : 0; diff --git a/lib/Target/ARM/ARMScheduleA8.td b/lib/Target/ARM/ARMScheduleA8.td index 32d9d66837..1f19b21e1c 100644 --- a/lib/Target/ARM/ARMScheduleA8.td +++ b/lib/Target/ARM/ARMScheduleA8.td @@ -237,7 +237,7 @@ def CortexA8Itineraries : ProcessorItineraries< // // FP Special Register to Integer Register File Move InstrItinData<IIC_fpSTAT , [InstrStage<1, [A8_Pipe0, A8_Pipe1]>, - InstrStage<1, [A8_NLSPipe]>]>, + InstrStage<1, [A8_NLSPipe]>], [20]>, // // Single-precision FP Unary InstrItinData<IIC_fpUNA32 , [InstrStage<1, [A8_Pipe0, A8_Pipe1]>, diff --git a/lib/Target/ARM/ARMScheduleA9.td b/lib/Target/ARM/ARMScheduleA9.td index 20aa64163b..3096b0ad99 100644 --- a/lib/Target/ARM/ARMScheduleA9.td +++ b/lib/Target/ARM/ARMScheduleA9.td @@ -431,7 +431,8 @@ def CortexA9Itineraries : ProcessorItineraries< InstrStage<1, [A9_MUX0], 0>, InstrStage<1, [A9_DRegsVFP], 0, Required>, InstrStage<2, [A9_DRegsN], 0, Reserved>, - InstrStage<1, [A9_NPipe]>]>, + InstrStage<1, [A9_NPipe]>], + [1]>, // // Single-precision FP Unary InstrItinData<IIC_fpUNA32 , [InstrStage<1, [A9_Issue0, A9_Issue1], 0>, |