mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Better annotate unlikely conditions
And in case of gcc we win also a small speed optimization due to better branch prediction. No functional change.
This commit is contained in:
@@ -1454,7 +1454,7 @@ moves_loop: // When in check and at SpNode search starts from here
|
||||
| (attacks_bb<BISHOP>(m2to, occ) & pos.pieces(color_of(pc), QUEEN, BISHOP));
|
||||
|
||||
// Verify attackers are triggered by our move and not already existing
|
||||
if (xray && (xray & ~pos.attacks_from<QUEEN>(m2to))) // Unlikely xray
|
||||
if (unlikely(xray) && (xray & ~pos.attacks_from<QUEEN>(m2to)))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user