From 8de2ba15c198071c5c879702c0c2e37e025efd1f Mon Sep 17 00:00:00 2001 From: Chris Dewhurst Date: Sun, 19 Jun 2016 12:56:42 +0000 Subject: [PATCH] [SPARC] Additional condition required for DelaySlot fixing erratum in revision r273108. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273111 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Sparc/DelaySlotFiller.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Target/Sparc/DelaySlotFiller.cpp b/lib/Target/Sparc/DelaySlotFiller.cpp index 70acb506b67..944f3551279 100644 --- a/lib/Target/Sparc/DelaySlotFiller.cpp +++ b/lib/Target/Sparc/DelaySlotFiller.cpp @@ -278,6 +278,13 @@ bool Filler::delayHasHazard(MachineBasicBlock::iterator candidate, Opcode >= SP::LDDArr && Opcode <= SP::LDrr) return true; + // Same as above for FDIV and FSQRT on some LEON processors. + if (Subtarget->fixAllFDIVSQRT() + && + Opcode >= SP::FDIVD && Opcode <= SP::FSQRTD) + return true; + + return false; } -- 2.50.1