[llvm] d38addf - Fix MSVC signed/unsigned mismatch warning
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 09:36:54 PDT 2024
Author: Simon Pilgrim
Date: 2024-10-08T17:36:35+01:00
New Revision: d38addf09996498adfff37f300bd9ac21fdd9810
URL: https://github.com/llvm/llvm-project/commit/d38addf09996498adfff37f300bd9ac21fdd9810
DIFF: https://github.com/llvm/llvm-project/commit/d38addf09996498adfff37f300bd9ac21fdd9810.diff
LOG: Fix MSVC signed/unsigned mismatch warning
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 d9e0fdfffe8dea..7ced7a6d8eadbc 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -17000,7 +17000,7 @@ void BoUpSLP::computeMinimumValueSizes() {
// Check if the root is trunc and the next node is gather/buildvector, then
// keep trunc in scalars, which is free in most cases.
if (E.isGather() && IsTruncRoot && E.UserTreeIndices.size() == 1 &&
- E.Idx > (IsStoreOrInsertElt ? 2 : 1) &&
+ E.Idx > (IsStoreOrInsertElt ? 2u : 1u) &&
all_of(E.Scalars, [&](Value *V) {
return V->hasOneUse() || isa<Constant>(V) ||
(!V->hasNUsesOrMore(UsesLimit) &&
More information about the llvm-commits
mailing list