From: George Burgess IV Date: Tue, 13 Jun 2017 01:28:49 +0000 (+0000) Subject: Fix signed/unsigned comparison warning; NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cff96a9836c39723fac82f078761e48631f05d7b;p=llvm Fix signed/unsigned comparison warning; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305262 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/NewGVN.cpp b/lib/Transforms/Scalar/NewGVN.cpp index 6926aae3796..8fe398d1e82 100644 --- a/lib/Transforms/Scalar/NewGVN.cpp +++ b/lib/Transforms/Scalar/NewGVN.cpp @@ -3561,7 +3561,7 @@ bool NewGVN::eliminateInstructions(Function &F) { // TODO: It would be faster to use getNumIncomingBlocks() on a phi node in // the block and subtract the pred count, but it's more complicated. if (ReachablePredCount.lookup(BB) != - std::distance(pred_begin(BB), pred_end(BB))) { + unsigned(std::distance(pred_begin(BB), pred_end(BB)))) { for (auto II = BB->begin(); isa(II); ++II) { auto &PHI = cast(*II); ReplaceUnreachablePHIArgs(PHI, BB);