[PATCH] D91077: [LoopVectorizer][SVE] Vectorize a simple loop with with a scalable VF.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 02:51:29 PST 2020

dmgreen added inline comments.

Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5626
+  //
+  // For scalable vectors we can't know if interleaving is beneficial. It may
+  // not be beneficial for small loops if none of the lanes in the second vector
sdesmalen wrote:
> dmgreen wrote:
> > Is it worth just not automatically interleaving for the moment? It might simplify things until the cost model is doing better, at least.
> From a functional perspective, interleaving should be no different for scalable VFs as they are for fixed-width VFs. That means that if we keep interleaving enabled for scalable vectors, we'll be testing more functionality and code-paths in the vectorizer. We're still a way off from cost-modelling this properly, so until then I'd like to suggest we keep this enabled by default mostly for testing purposes. Does that make sense?
I was hoping that if we remove the need for this, we could remove the need for the "if scalable return 1" in the cost model. That way we get the testing of the cost model, which seems like a larger issue to test to me.

Can we remove that cost model change already? Or are there too many paths that do not work yet? The simple loop you have in the commit message might work already.



More information about the llvm-commits mailing list