[llvm] efb5040 - Fixed warning about signed/unsigned comparison
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 17 11:03:51 PDT 2020
Author: Stanislav Mekhanoshin
Date: 2020-07-17T11:03:42-07:00
New Revision: efb5040262930908a88632ff91f3df3cba4a7c1d
URL: https://github.com/llvm/llvm-project/commit/efb5040262930908a88632ff91f3df3cba4a7c1d
DIFF: https://github.com/llvm/llvm-project/commit/efb5040262930908a88632ff91f3df3cba4a7c1d.diff
LOG: Fixed warning about signed/unsigned comparison
I've got the report clang11 issues signed/unsigned mismatch
warning here. For some reason only clang11 seems to issue
this warning.
Differential Revision: https://reviews.llvm.org/D83916
Added:
Modified:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 5bc35aa4695f..5fb8ad56d8b3 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -7407,7 +7407,7 @@ bool SLPVectorizerPass::vectorizeChainsInBlock(BasicBlock *BB, BoUpSLP &R) {
while (SameTypeIt != E &&
(*SameTypeIt)->getType() == EltTy &&
- (SameTypeIt - IncIt) < MaxNumElts) {
+ static_cast<unsigned>(SameTypeIt - IncIt) < MaxNumElts) {
VisitedInstrs.insert(*SameTypeIt);
++SameTypeIt;
}
More information about the llvm-commits
mailing list