[llvm] r305262 - Fix signed/unsigned comparison warning; NFC
George Burgess IV via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 12 18:28:49 PDT 2017
Author: gbiv
Date: Mon Jun 12 20:28:49 2017
New Revision: 305262
URL: http://llvm.org/viewvc/llvm-project?rev=305262&view=rev
Log:
Fix signed/unsigned comparison warning; NFC
Modified:
llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp?rev=305262&r1=305261&r2=305262&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp Mon Jun 12 20:28:49 2017
@@ -3561,7 +3561,7 @@ bool NewGVN::eliminateInstructions(Funct
// 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<PHINode>(II); ++II) {
auto &PHI = cast<PHINode>(*II);
ReplaceUnreachablePHIArgs(PHI, BB);
More information about the llvm-commits
mailing list