[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. llvm-svn: 175226
This commit is contained in:
parent
06bd138dad
commit
30f05f3dc7
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue