I’ve attached an updated version of the diagram I presented at the EuroLLVM round table. I think the overall reaction to showing a roadmap for upstreaming our current work was fairly positive, and the diagram is color coded to show the parts I expect to require more discussion.
Robin Kruppe has managed to find a way to use the scalable vector type for the latest incarnation of the RISC-V V extension without needing to change vscale at runtime, so that has been completely removed from the proposal.
Discussion at the roundtable and on the main type patch (https://reviews.llvm.org/D32530) turned towards the initial restrictions and implications, with a couple major decisions being taken:
We can only use a ‘zeroinitializer’ for a shufflevector mask in the short term, which allows for splats. Additional types of shuffles will be discussed later, and I need to produce a list of canonical shuffles in IR using ‘stepvector’ and ‘vscale’. Those will initially be represented as intrinsics so can’t be used as part of a constant mask. This allows us to make reasonable progress on supporting SVE, since most loops that LoopVectorize currently handles don’t require other shuffle types.
For scalable vectors, ‘insertelement’ and ‘extractelement’ will not check the index against the minimum number of lanes; if an index is constructed that could be out of range at runtime you will not get an undef value in IR, but implementation-defined behaviour at runtime.
Any feedback on these decisions is welcome.