[PATCH] D79806: [CodeGen] Specify meaning of ISD opcodes for scalable vectors

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 22 11:47:47 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/ISDOpcodes.h:488
+  /// VECTOR2. Elements IDX_0 through (IDX_0 + vector_length(VECTOR2) - 1)
+  /// must be valid VECTOR1 indices.
+  /// IDX must be a constant multiple of T's known minimum vector length.
----------------
Not sure what "must be valid VECTOR1 indices" means in the context of mixed fixed/scalable vectors.  We can't verify that at compile-time, so what happens if they aren't at runtime?

We currently assert that the index of an INSERT_SUBVECTOR is in range of the input. Do you plan to relax that in all cases? In the mixed fixed/scalable case?


================
Comment at: llvm/include/llvm/CodeGen/ISDOpcodes.h:489
+  /// must be valid VECTOR1 indices.
+  /// IDX must be a constant multiple of T's known minimum vector length.
+  /// This operation supports inserting a fixed-width vector into a
----------------
Maybe put a blank line here?


================
Comment at: llvm/include/llvm/CodeGen/ISDOpcodes.h:495
+  /// EXTRACT_SUBVECTOR(VECTOR, IDX) - Returns a subvector from VECTOR.
+  /// Let the result type be T, then IDX is first scaled by the same runtime
+  /// scaling factor of T. The resulting index represents the starting
----------------
Maybe say "If T is scalable, then IDX..."

We currently assert that the index of an EXTRACT_SUBVECTOR is in range of the input.  Do you plan to relax that in all cases?  In the mixed fixed/scalable case?


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

https://reviews.llvm.org/D79806





More information about the llvm-commits mailing list