[SLP][NFC]Fix a warning in a comparison, NFC.
authorAlexey Bataev <a.bataev@outlook.com>
Tue, 21 Jun 2022 17:04:39 +0000 (10:04 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Tue, 21 Jun 2022 17:19:47 +0000 (10:19 -0700)
Fixed signedness warning.

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

index 746ad43..dc6f85e 100644 (file)
@@ -4620,10 +4620,10 @@ void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth,
     for (int Op = 0, E = S.MainOp->getNumOperands(); Op < E; ++Op)
       Candidates.emplace_back().emplace_back(I1->getOperand(Op),
                                              I2->getOperand(Op));
-    if (count_if(
+    if (static_cast<unsigned>(count_if(
             Candidates, [this](ArrayRef<std::pair<Value *, Value *>> Cand) {
               return findBestRootPair(Cand, LookAheadHeuristics::ScoreSplat);
-            }) >= S.MainOp->getNumOperands() / 2)
+            })) >= S.MainOp->getNumOperands() / 2)
       return false;
     if (S.MainOp->getNumOperands() > 2)
       return true;