mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
[SLP][NFC]Fix a warning for comparison of integers of different signs.
This commit is contained in:
@@ -4346,9 +4346,10 @@ BoUpSLP::LoadsState BoUpSLP::canVectorizeLoads(
|
||||
// increases the cost.
|
||||
Loop *L = LI->getLoopFor(cast<LoadInst>(VL0)->getParent());
|
||||
bool ProfitableGatherPointers =
|
||||
L && Sz > 2 && count_if(PointerOps, [L](Value *V) {
|
||||
return L->isLoopInvariant(V);
|
||||
}) <= Sz / 2;
|
||||
L && Sz > 2 &&
|
||||
static_cast<unsigned>(count_if(PointerOps, [L](Value *V) {
|
||||
return L->isLoopInvariant(V);
|
||||
})) <= Sz / 2;
|
||||
if (ProfitableGatherPointers || all_of(PointerOps, [IsSorted](Value *P) {
|
||||
auto *GEP = dyn_cast<GetElementPtrInst>(P);
|
||||
return (IsSorted && !GEP && doesNotNeedToBeScheduled(P)) ||
|
||||
|
||||
Reference in New Issue
Block a user