<div dir="ltr"><div>Hi,</div><div><br></div>RISCV vector intrinsics have a need to return multiple scalable vector values. We plan to use this to return multiple results from segment load intrinsics. These instructions conceptually load multiple separate registers. I believe SVE has similar load intrinsics, but they use wide scalable vectors that get split during type legalization. We are struggling to do the same since we already use the size of the fixed part of a scalable vector to determine LMUL size. This means we have legal scalable vector types with different fixed part sizes. This makes it very difficult for type legalization to split a wide vector type for a segment load into the correct number of pieces. We feel that returning multiple results and avoiding the type legalizer is an easier path.<div><br><div>Unfortunately, supporting multiple scalable vectors being returned from an intrinsic requires scalable vectors to be allowed in structs. We would disallow such structs to be used by loads/stores/allocas/geps which would avoid needing to determine the offsets of any of the fields in the struct.</div><div><br></div><div>I've posted an initial patch for the IR and verifier portions of this here <a href="https://reviews.llvm.org/D94142">https://reviews.llvm.org/D94142</a></div><div><br></div><div>We would appreciate any feedback on this direction.</div><div><div><br></div><div>Thanks,<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div></div></div></div></div>