On 16 May 2017 at 10:31, Paul Gilmartin <
00000014e0e4a59b-dmarc-requ...@listserv.uga.edu> wrote:

> I have wondered in cases where the programmer knows a priori
> that branch taken is more likely whether a branch around a
> branch better exploits the branch prediction rules.  For
> example, instead of:
>
>          BC    MASK,TARGET  Incorrectly predicts branch not taken
>
> How about:
>
>          BC    15-MASK,*+8  Correctly predicts branch not taken
>          B     TARGET       Correctly predicts branch taken
>
> Of course it would be better, if practical, to rearrange the code.
>

Or to use the Branch Prediction [Relative] Preload instruction. Assuming
recent hardware, etc. etc.

Tony H.

Reply via email to