[PATCH] D94142: [IR] Allow scalable vectors in structs to support intrinsics returning multiple values.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 05:16:56 PST 2021


sdesmalen added inline comments.


================
Comment at: llvm/test/Other/scalable-vector-struct-intrinsic.ll:6
+; values from intrinsics.
+
+declare { <vscale x 2 x i32>, <vscale x 2 x i1> } @llvm.sadd.with.overflow.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i32>)
----------------
sdesmalen wrote:
> I guess this patch allows:
>   declare { <vscale x 2 x i32>, i32 } @foo()
> 
> Is that deliberate?
With the example above I actually meant to point out the combination of a scalable-vector and a non-scalable type (i32). I'm not sure if this would still be a problem if the only nodes that can return such a struct are intrinsics. Probably SelectionDAGBuilder can just take return value K from the SDNode for the lowered intrinsic. Can you confirm this won't lead to any issues?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94142



More information about the llvm-commits mailing list