[llvm] r175226 - [mips] Disallow moving load/store instructions past volatile instructions.

Akira Hatanaka ahatanaka at mips.com
Thu Feb 14 15:54:40 PST 2013


Author: ahatanak
Date: Thu Feb 14 17:54:40 2013
New Revision: 175226

URL: http://llvm.org/viewvc/llvm-project?rev=175226&view=rev
Log:
[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.

Modified:
    llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp

Modified: llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp?rev=175226&r1=175225&r2=175226&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp Thu Feb 14 17:54:40 2013
@@ -208,7 +208,7 @@ bool Filler::delayHasHazard(const Machin
 
   // 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()) {





More information about the llvm-commits mailing list