Skip to content

Commit 196a4a8

Browse files
committed
cpu-o3: block second uBTB block when conditional appears
Change-Id: Ife53cf3c2b710eb1167e3798a39d1af98976f97a
1 parent 2224a99 commit 196a4a8

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/cpu/pred/btb/decoupled_bpred.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,12 @@ DecoupledBPUWithBTB::shouldGenerateSecondFromUBTB(
218218
return false;
219219
}
220220

221-
// Guard against history pollution: no conditional branch is allowed
222-
// before the terminating taken branch in the second block.
221+
// Guard against history pollution: second block should not contain any
222+
// conditional branch when second-direction prediction is disabled.
223223
for (const auto &entry : ubtbPred.btbEntries) {
224224
if (!entry.valid) {
225225
continue;
226226
}
227-
if (entry.pc == takenEntry.pc) {
228-
break;
229-
}
230227
if (entry.isCond) {
231228
return false;
232229
}

0 commit comments

Comments
 (0)