]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Use llvm linker with clang on windows for LTO.
[stockfish] / src / search.cpp
index a2342a3cf4f90d50eeccce10a8d25a6afceef3e2..c676bd6d62ca05d46f5851ca5211f661f6a50f7b 100644 (file)
@@ -944,7 +944,7 @@ namespace {
             }
          ss->ttPv = ttPv;
     }
-    
+
     // Step 11. If the position is not in TT, decrease depth by 2
     if (   PvNode
         && depth >= 6
@@ -1585,7 +1585,7 @@ moves_loop: // When in check, search starts from here
                                                                 [to_sq(move)];
 
       if (  !captureOrPromotion
-          && moveCount >= abs(depth) + 1
+          && moveCount
           && (*contHist[0])[pos.moved_piece(move)][to_sq(move)] < CounterMovePruneThreshold
           && (*contHist[1])[pos.moved_piece(move)][to_sq(move)] < CounterMovePruneThreshold)
           continue;
@@ -1964,7 +1964,7 @@ void Tablebases::rank_root_moves(Position& pos, Search::RootMoves& rootMoves) {
     if (RootInTB)
     {
         // Sort moves according to TB rank
-        std::sort(rootMoves.begin(), rootMoves.end(),
+        std::stable_sort(rootMoves.begin(), rootMoves.end(),
                   [](const RootMove &a, const RootMove &b) { return a.tbRank > b.tbRank; } );
 
         // Probe during search only if DTZ is not available and we are winning