Micro-optimization for SEE: remove a superfluous condition

This condition can never be true, it's superfluous.

It never triggers even with a bench 16 1 20 run.
To met the condition it would imply that the previous recapture was done
by a higher rated piece than a Queen.
This is only the case when the King recaptures and that's already
handled in line 1161: (return (attackers & ~pieces(stm)) ? res ^ 1).

closes https://github.com/official-stockfish/Stockfish/pull/5839

No functional change
This commit is contained in:
Guenther Demetz
2025-01-31 15:41:03 +01:00
committed by Disservin
parent d46c0b6f49
commit 2a1ab11ab0
+3 -2
View File
@@ -1137,8 +1137,9 @@ bool Position::see_ge(Move m, int threshold) const {
else if ((bb = stmAttackers & pieces(QUEEN)))
{
if ((swap = QueenValue - swap) < res)
break;
swap = QueenValue - swap;
// implies that the previous recapture was done by a higher rated piece than a Queen (King is excluded)
assert(swap >= res);
occupied ^= least_significant_square_bb(bb);
attackers |= (attacks_bb<BISHOP>(to, occupied) & pieces(BISHOP, QUEEN))