Open robert-g-liu opened 10 months ago
Gshare branch predicator has the same issue. After local fix, improvement on both Num of branch prediction misses and IPC could be seen.
Thank you for reporting the issue. What you pointed out is indeed correct. I have confirmed that the number of branch mispredictions and IPC improved after the fix.
I will push the fix to the repository soon.
Literally in the btbQueuePointer the comment pointes out The "tailPtr" points the address of a next pushed entry.
BTB used headPtr for pushing entry. See code line below.
Similarly, to pop the queue, tailPtr was used so stale/invalid data was fetched: