diff options
author | Dinar Temirbulatov <dtemirbulatov@gmail.com> | 2017-08-31 14:10:07 +0000 |
---|---|---|
committer | Dinar Temirbulatov <dtemirbulatov@gmail.com> | 2017-08-31 14:10:07 +0000 |
commit | 8870a14e4e54266478effdb2af5172d6affa39c1 (patch) | |
tree | 7a559c4cbbfab281938e5973332c69e2848c08b4 /llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | |
parent | 185c81725ec04a5e24a7122ecca8fdd0286af125 (diff) | |
download | bcm5719-llvm-8870a14e4e54266478effdb2af5172d6affa39c1.tar.gz bcm5719-llvm-8870a14e4e54266478effdb2af5172d6affa39c1.zip |
[SLPVectorizer] Move out Entry->NeedToGather check and assert of inner loop as invariant, NFCI.
llvm-svn: 312242
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 1f530cbb5d2..147860db400 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -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()) { |