summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsDelaySlotFiller.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2013-02-14 23:54:40 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2013-02-14 23:54:40 +0000
commitd977aacf990d241d0224d20518f631a928c1b1a8 (patch)
treeec22472a63c0903fda349446feecfd87873e28f6 /lib/Target/Mips/MipsDelaySlotFiller.cpp
parentcd7319dc5f91ac81ab9d8505f34937e91bfcf65d (diff)
downloadllvm-d977aacf990d241d0224d20518f631a928c1b1a8.tar.gz
llvm-d977aacf990d241d0224d20518f631a928c1b1a8.tar.bz2
llvm-d977aacf990d241d0224d20518f631a928c1b1a8.tar.xz
[mips] Disallow moving load/store instructions past volatile instructions.
Unfortunately, I wasn't able to create a test case that demonstrates the problem I was trying to fix with this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175226 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsDelaySlotFiller.cpp')
-rw-r--r--lib/Target/Mips/MipsDelaySlotFiller.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsDelaySlotFiller.cpp b/lib/Target/Mips/MipsDelaySlotFiller.cpp
index b56d9cd22b..6b25d2d97c 100644
--- a/lib/Target/Mips/MipsDelaySlotFiller.cpp
+++ b/lib/Target/Mips/MipsDelaySlotFiller.cpp
@@ -208,7 +208,7 @@ bool Filler::delayHasHazard(const MachineInstr &Candidate, bool &SawLoad,
// Loads or stores cannot be moved past a store to the delay slot
// and stores cannot be moved past a load.
- if (Candidate.mayStore()) {
+ if (Candidate.mayStore() || Candidate.hasOrderedMemoryRef()) {
HasHazard |= SawStore | SawLoad;
SawStore = true;
} else if (Candidate.mayLoad()) {