[PATCH] D79806: [CodeGen][SVE] Specify meaning of EXTRACT_SUBVECTOR for scalable vectors
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 12 15:37:41 PDT 2020
efriedma added a reviewer: craig.topper.
efriedma added a comment.
Both the scaled and unscaled variations are potentially useful. But the scaled variation is probably more useful, and it's probably a lot less work to use the names INSERT_SUBVECTOR and EXTRACT_SUBVECTOR for the scaled version. So this probably makes sense.
I think I'd rather use a different opcode for the cases where you're mixing fixed/scalable vectors. There are some potentially weird edge cases to deal with there, and the existing code is much more likely to blow up. For example, can you extract an `<8 x i32>` from a `<vscale x 4 x i32>`? Does it matter if we know that vscale is 2 or more for the current subtarget?
While we're looking at this, the "potentially variable" part is very messy, and it looks like nothing actually takes advantage of it. Posted https://reviews.llvm.org/D79814 .
While you're in ISDOpcodes, can you add notes to various other vector-specific operations? Probably BUILD_VECTOR and VECTOR_SHUFFLE should always return fixed vectors, and the behavior of INSERT_VECTOR_ELT/EXTRACT_VECTOR_ELT/CONCAT_VECTORS/VSELECT should be clear. But better to note it explicitly, I think.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79806/new/
https://reviews.llvm.org/D79806
More information about the llvm-commits
mailing list