mem-cache: Avoid hiding a virtual method in the dictionary compressor.
[gem5.git] / src / mem / cache / mshr.cc
index 13a50169c4a7c7c31994221b9c8eaae0720c7f07..4241fa375c86f5a4e9d41137a68c9299f59bfe07 100644 (file)
@@ -612,8 +612,10 @@ MSHR::promoteReadable()
 void
 MSHR::promoteWritable()
 {
+    PacketPtr def_tgt_pkt = deferredTargets.front().pkt;
     if (deferredTargets.needsWritable &&
-        !(hasPostInvalidate() || hasPostDowngrade())) {
+        !(hasPostInvalidate() || hasPostDowngrade()) &&
+        !def_tgt_pkt->req->isCacheInvalidate()) {
         // We got a writable response, but we have deferred targets
         // which are waiting to request a writable copy (not because
         // of a pending invalidate).  This can happen if the original