[SLPVectorizer] Move out Entry->NeedToGather check and assert of inner loop as invariant, NFCI.

llvm-svn: 312242
This commit is contained in:
Dinar Temirbulatov 2017-08-31 14:10:07 +00:00
parent 185c81725e
commit 8870a14e4e
1 changed files with 6 additions and 5 deletions

View File

@ -3198,14 +3198,15 @@ BoUpSLP::vectorizeTree(ExtraValueToDebugLocsMap &ExternallyUsedValues) {
for (TreeEntry &EIdx : VectorizableTree) {
TreeEntry *Entry = &EIdx;
// No need to handle users of gathered values.
if (Entry->NeedToGather)
continue;
assert(Entry->VectorizedValue && "Can't find vectorizable value");
// For each lane:
for (int Lane = 0, LE = Entry->Scalars.size(); Lane != LE; ++Lane) {
Value *Scalar = Entry->Scalars[Lane];
// No need to handle users of gathered values.
if (Entry->NeedToGather)
continue;
assert(Entry->VectorizedValue && "Can't find vectorizable value");
Type *Ty = Scalar->getType();
if (!Ty->isVoidTy()) {