We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ed8f19 commit ea41ac1Copy full SHA for ea41ac1
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -4346,9 +4346,10 @@ BoUpSLP::LoadsState BoUpSLP::canVectorizeLoads(
4346
// increases the cost.
4347
Loop *L = LI->getLoopFor(cast<LoadInst>(VL0)->getParent());
4348
bool ProfitableGatherPointers =
4349
- L && Sz > 2 && count_if(PointerOps, [L](Value *V) {
4350
- return L->isLoopInvariant(V);
4351
- }) <= Sz / 2;
+ L && Sz > 2 &&
+ static_cast<unsigned>(count_if(PointerOps, [L](Value *V) {
+ return L->isLoopInvariant(V);
4352
+ })) <= Sz / 2;
4353
if (ProfitableGatherPointers || all_of(PointerOps, [IsSorted](Value *P) {
4354
auto *GEP = dyn_cast<GetElementPtrInst>(P);
4355
return (IsSorted && !GEP && doesNotNeedToBeScheduled(P)) ||
0 commit comments