forked from OSchip/llvm-project
[SLPVectorizer] Move out Entry->NeedToGather check and assert of inner loop as invariant, NFCI.
llvm-svn: 312242
This commit is contained in:
parent
185c81725e
commit
8870a14e4e
|
@ -3198,14 +3198,15 @@ BoUpSLP::vectorizeTree(ExtraValueToDebugLocsMap &ExternallyUsedValues) {
|
||||||
for (TreeEntry &EIdx : VectorizableTree) {
|
for (TreeEntry &EIdx : VectorizableTree) {
|
||||||
TreeEntry *Entry = &EIdx;
|
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 each lane:
|
||||||
for (int Lane = 0, LE = Entry->Scalars.size(); Lane != LE; ++Lane) {
|
for (int Lane = 0, LE = Entry->Scalars.size(); Lane != LE; ++Lane) {
|
||||||
Value *Scalar = Entry->Scalars[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();
|
Type *Ty = Scalar->getType();
|
||||||
if (!Ty->isVoidTy()) {
|
if (!Ty->isVoidTy()) {
|
||||||
|
|
Loading…
Reference in New Issue