]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Better annotate unlikely conditions
[stockfish] / src / evaluate.cpp
index 8bbd0bff161b3917f6fae299f6f21fe7ff65d2af..bb9a2f97c0f5b7fddbe3c5aec66eb20e8aab332a 100644 (file)
@@ -823,7 +823,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
                 // If there is an enemy rook or queen attacking the pawn from behind,
                 // add all X-ray attacks by the rook or queen. Otherwise consider only
                 // the squares in the pawn's path attacked or occupied by the enemy.
-                if (   (forward_bb(Them, s) & pos.pieces(Them, ROOK, QUEEN)) // Unlikely
+                if (    unlikely(forward_bb(Them, s) & pos.pieces(Them, ROOK, QUEEN))
                     && (forward_bb(Them, s) & pos.pieces(Them, ROOK, QUEEN) & pos.attacks_from<ROOK>(s)))
                     unsafeSquares = squaresToQueen;
                 else