diff options
author | Dinar Temirbulatov <dtemirbulatov@gmail.com> | 2017-06-29 21:56:33 +0000 |
---|---|---|
committer | Dinar Temirbulatov <dtemirbulatov@gmail.com> | 2017-06-29 21:56:33 +0000 |
commit | f05c73c132a1fcaf2830b04c1cc0f09c7624c416 (patch) | |
tree | 5d2dadedd7f54367beffa2c7906477cb2812a1e9 /llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | |
parent | 346988bf029c5cd1cf57a39442215a912b34d056 (diff) | |
download | bcm5719-llvm-f05c73c132a1fcaf2830b04c1cc0f09c7624c416.tar.gz bcm5719-llvm-f05c73c132a1fcaf2830b04c1cc0f09c7624c416.zip |
[SLPVectorizer] Moving Entry->NeedToGather check out of inner loop,
since it is invariant there. NFCI.
llvm-svn: 306749
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 66c0ecab4db..6f5d2a6e00f 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -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()) { |