[SLPVectorizer] Moving Entry->NeedToGather check out of inner loop,
since it is invariant there. NFCI. llvm-svn: 306749
This commit is contained in:
@@ -1062,14 +1062,14 @@ void BoUpSLP::buildTree(ArrayRef<Value *> Roots,
|
||||
for (TreeEntry &EIdx : VectorizableTree) {
|
||||
TreeEntry *Entry = &EIdx;
|
||||
|
||||
// No need to handle users of gathered values.
|
||||
if (Entry->NeedToGather)
|
||||
continue;
|
||||
|
||||
// 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;
|
||||
|
||||
// Check if the scalar is externally used as an extra arg.
|
||||
auto ExtI = ExternallyUsedValues.find(Scalar);
|
||||
if (ExtI != ExternallyUsedValues.end()) {
|
||||
|
||||
Reference in New Issue
Block a user