O3: Don't test misprediction on load instructions until executed.
authorMatt Horsnell <Matt.Horsnell@arm.com>
Tue, 18 Jan 2011 22:30:05 +0000 (16:30 -0600)
committerMatt Horsnell <Matt.Horsnell@arm.com>
Tue, 18 Jan 2011 22:30:05 +0000 (16:30 -0600)
src/cpu/o3/iew_impl.hh

index 29c6786c025f5750f65481a771b767cad02e9c96..ce58868ba12423b73dc47cd59f11b0ac3afac007 100644 (file)
@@ -1297,7 +1297,11 @@ DefaultIEW<Impl>::executeInsts()
             !toCommit->squash[tid] ||
             toCommit->squashedSeqNum[tid] > inst->seqNum) {
 
-            if (inst->mispredicted()) {
+            // Prevent testing for misprediction on load instructions,
+            // that have not been executed.
+            bool loadNotExecuted = !inst->isExecuted() && inst->isLoad();
+
+            if (inst->mispredicted() && !loadNotExecuted) {
                 fetchRedirect[tid] = true;
 
                 DPRINTF(IEW, "Execute: Branch mispredict detected.\n");