From: marotear Date: Sun, 20 Jan 2019 11:24:03 +0000 (-0800) Subject: Simplify pvHit (#1953) X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=59b2486bc3d153b8946661c7a6a501f4410b4e66;hp=691a287bfe7a2afbfa1d2b3129f4a089b188b6e4 Simplify pvHit (#1953) Removing unnecessary excludedMove condition (there is not excluded move for PvNodes) and re-ordering computation. Non functional change. --- diff --git a/src/search.cpp b/src/search.cpp index 933cab87..4a1a3523 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -640,7 +640,7 @@ namespace { ttValue = ttHit ? value_from_tt(tte->value(), ss->ply) : VALUE_NONE; ttMove = rootNode ? thisThread->rootMoves[thisThread->pvIdx].pv[0] : ttHit ? tte->move() : MOVE_NONE; - pvHit = ttHit && tte->pv_hit(); + pvHit = (ttHit && tte->pv_hit()) || (PvNode && depth > 4 * ONE_PLY); // At non-PV nodes we check for an early TT cutoff if ( !PvNode @@ -674,11 +674,6 @@ namespace { return ttValue; } - if ( depth > 4 * ONE_PLY - && !excludedMove - && PvNode) - pvHit = true; - // Step 5. Tablebases probe if (!rootNode && TB::Cardinality) {