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

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 25 05:51:59 PDT 2020


sdesmalen marked 4 inline comments as done.
sdesmalen 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.
----------------
efriedma wrote:
> 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?
For the fixed/fixed and scalable/scalable case, we can determine this statically.
For the fixed/scalable case, I've added wording that the result vector is undefined if this turns out to be false at runtime. This should match the behaviour of INSERT_VECTOR_ELT.

I don't really see a reason to relax this for the fixed/fixed and scalable/scalable cases at this point, let me know if you think it should be changed.


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

https://reviews.llvm.org/D79806





More information about the llvm-commits mailing list