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

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 07:38:44 PST 2020


sdesmalen 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
----------------
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?


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5667
                     << "LV: IC is " << IC << '\n'
                     << "LV: VF is " << VF.getKnownMinValue() << '\n');
   const bool AggressivelyInterleaveReductions =
----------------
dmgreen wrote:
> Is there a better way to print this?
Good point. I believe this can just print VF since ElementCount defines `operator<<` that adds `"vscale x "`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91077/new/

https://reviews.llvm.org/D91077



More information about the llvm-commits mailing list