[PATCH] D50840: [InstCombine] Extend collectShuffleElements to support extract/zext/insert patterns
Renlin Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 16 09:03:46 PDT 2018
renlin added a comment.
In https://reviews.llvm.org/D50840#1202564, @joey wrote:
> I haven't worked with the SLPVectorizer before, so would need some guidance in making the change there. Or someone could take over the change, if it's easier.
>
> I found that if I apply the following patch:
>
> diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp b/lib/Transforms/Vectorize/SLPVectorizer.cpp
> index 32df6d58157..76103732adc 100644
> --- a/lib/Transforms/Vectorize/SLPVectorizer.cpp
> +++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp
> @@ -2431,8 +2431,10 @@ bool BoUpSLP::isFullyVectorizableTinyTree() {
> return true;
>
> // Gathering cost would be too much for tiny trees.
> +/*
> if (VectorizableTree[0].NeedToGather || VectorizableTree[1].NeedToGather)
> return false;
> +*/
>
It seems that, the buildvector instructions are not counted in the VectorizableTree while the cost is properly included as a parameter to tryToVectorizeList.
Repository:
rL LLVM
https://reviews.llvm.org/D50840
More information about the llvm-commits
mailing list