Simplify TT cutoff and penalize condition checks
In Step 6 checks for an early TT cutoff and, if that fails due to a bound mismatch, penalizes the TT entry.
Both the cutoff check (if) and the penalize check (else if) share several identical preconditions:
!PvNode
!excludedMove
is_valid(ttData.value)
ttData.depth > depth - (ttData.value <= beta)
This patch factors these common checks into an outer if block. This reduces code duplication and clarifies that TT penalization is only considered when depth criteria for a cutoff were already met.
Passed Non-Reg:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 132800 W: 33818 L: 33712 D: 65270
Ptnml(0-2): 173, 13906, 38116, 14052, 153
https://tests.stockfishchess.org/tests/view/6aa690a3a8284b37a0a05ba8
closes https://github.com/official-stockfish/Stockfish/pull/7160
No functional change