File tree Expand file tree Collapse file tree 1 file changed +15
-17
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -10776,23 +10776,21 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
1077610776 }
1077710777 if (ForExtracts) {
1077810778 // No need to add vectors here, already handled them in adjustExtracts.
10779- assert(
10780- InVectors.size() == 1 && isa<const TreeEntry *>(InVectors.front()) &&
10781- !CommonMask.empty() &&
10782- all_of(enumerate(CommonMask),
10783- [&](auto P) {
10784- Value *Scalar =
10785- InVectors.front().get<const TreeEntry *>()->getOrdered(
10786- P.index());
10787- if (P.value() == PoisonMaskElem)
10788- return P.value() == Mask[P.index()] ||
10789- isa<UndefValue>(Scalar);
10790- if (isa<Constant>(V1))
10791- return true;
10792- auto *EI = cast<ExtractElementInst>(Scalar);
10793- return EI->getVectorOperand() == V1;
10794- }) &&
10795- "Expected only tree entry for extractelement vectors.");
10779+ assert(InVectors.size() == 1 && isa<const TreeEntry *>(InVectors[0]) &&
10780+ !CommonMask.empty() &&
10781+ all_of(enumerate(CommonMask),
10782+ [&](auto P) {
10783+ Value *Scalar = cast<const TreeEntry *>(InVectors[0])
10784+ ->getOrdered(P.index());
10785+ if (P.value() == PoisonMaskElem)
10786+ return P.value() == Mask[P.index()] ||
10787+ isa<UndefValue>(Scalar);
10788+ if (isa<Constant>(V1))
10789+ return true;
10790+ auto *EI = cast<ExtractElementInst>(Scalar);
10791+ return EI->getVectorOperand() == V1;
10792+ }) &&
10793+ "Expected only tree entry for extractelement vectors.");
1079610794 return;
1079710795 }
1079810796 assert(!InVectors.empty() && !CommonMask.empty() &&
You can’t perform that action at this time.
0 commit comments