[llvm-dev] Update on scalable vector types and SVE upstreaming

Graham Hunter via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 30 02:21:49 PDT 2019


Hi all,

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:

  1. 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.

  2. 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.

-Graham

[cid:8F527004-41F0-464E-AD93-672A3FCAB1D3 at manchester.arm.com]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190430/159dfd32/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SVE Upstreaming Components.png
Type: image/png
Size: 124622 bytes
Desc: SVE Upstreaming Components.png
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190430/159dfd32/attachment-0001.png>


More information about the llvm-dev mailing list