summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
diff options
context:
space:
mode:
authorZoran Jovanovic <zoran.jovanovic@mips.com>2018-06-13 12:51:37 +0000
committerZoran Jovanovic <zoran.jovanovic@mips.com>2018-06-13 12:51:37 +0000
commit3a7654c15dd204fe3454f477fc576924e3686d0d (patch)
tree09e33b275f26d132d300698e00e8a455d6908e33 /llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
parent36b816f81409828133e47c29525d9df35cd4e1a7 (diff)
downloadbcm5719-llvm-3a7654c15dd204fe3454f477fc576924e3686d0d.tar.gz
bcm5719-llvm-3a7654c15dd204fe3454f477fc576924e3686d0d.zip
[mips][microMIPS] Extending size reduction pass with LWP and SWP
Author: milena.vujosevic.janicic Reviewers: sdardis The patch extends size reduction pass for MicroMIPS. It introduces reduction of two instructions into one instruction: Two SW instructions are transformed into one SWP instrucition. Two LW instructions are transformed into one LWP instrucition. Differential Revision: https://reviews.llvm.org/D39115 llvm-svn: 334595
Diffstat (limited to 'llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp')
-rw-r--r--llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp b/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
index 56eb539c8f1..33f03b954a8 100644
--- a/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
+++ b/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
@@ -728,6 +728,10 @@ bool MipsDelaySlotFiller::searchRange(MachineBasicBlock &MBB, IterTy Begin,
(Opcode == Mips::JR || Opcode == Mips::PseudoIndirectBranch ||
Opcode == Mips::PseudoReturn || Opcode == Mips::TAILCALL))
continue;
+ // Instructions LWP/SWP should not be in a delay slot as that
+ // results in unpredictable behaviour
+ if (InMicroMipsMode && (Opcode == Mips::LWP_MM || Opcode == Mips::SWP_MM))
+ continue;
Filler = CurrI;
return true;
OpenPOWER on IntegriCloud