cpu: o3: combine if with same condition
authorNilay Vaish <nilay@cs.wisc.edu>
Mon, 9 Mar 2015 14:39:07 +0000 (09:39 -0500)
committerNilay Vaish <nilay@cs.wisc.edu>
Mon, 9 Mar 2015 14:39:07 +0000 (09:39 -0500)
src/cpu/o3/commit_impl.hh

index 403e582d3985f14770e87743826c47dda1f0a30d..a62c5f26063cbee1de7851539561224037bbebe3 100644 (file)
@@ -906,13 +906,10 @@ DefaultCommit<Impl>::commit()
                 if (toIEW->commitInfo[tid].mispredictInst->isUncondCtrl()) {
                      toIEW->commitInfo[tid].branchTaken = true;
                 }
+                ++branchMispredicts;
             }
 
             toIEW->commitInfo[tid].pc = fromIEW->pc[tid];
-
-            if (toIEW->commitInfo[tid].mispredictInst) {
-                ++branchMispredicts;
-            }
         }
 
         if (commitStatus[tid] == ROBSquashing) {