[PATCH] D88962: [SVE] Add support for scalable vectors in vectorize_width loop attribute

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 03:48:30 PST 2020


sdesmalen added a subscriber: c-rhodes.
sdesmalen added a comment.

Can you add a test-case to `llvm/test/Transforms/LoopVectorize/metadata-width.ll` where it also tries to compile a loop with scalable VF? (and ensure it falls back to the fixed-width case until we add support for it)



================
Comment at: llvm/docs/LangRef.rst:5933-5934
 
-This metadata sets the target width of the vectorizer. The first
-operand is the string ``llvm.loop.vectorize.width`` and the second
-operand is an integer specifying the width. For example:
+The vector width is a tuple, where the first value specifies the minimum vector
+width and the second value indicates whether the vectorization factor is
+scalable or not. One example of this is shown below:
----------------
nit: @c-rhodes and I noticed yesterday that the term `minimum vector width` can give confusion, because it is not the width of the vector that the metadata describes (in terms of bytes), but rather the vectorization factor, i.e. the (minimum) number of vector lanes used to vectorize a loop. Can you clarify that in the description?


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

https://reviews.llvm.org/D88962



More information about the llvm-commits mailing list