[PATCH] D32530: [SVE][IR] Scalable Vector IR Type

Hideki Saito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 13:04:48 PDT 2019


hsaito added a comment.

In D32530#1466746 <https://reviews.llvm.org/D32530#1466746>, @huntergr wrote:

> In D32530#1464722 <https://reviews.llvm.org/D32530#1464722>, @hsaito wrote:
>
> > In D32530#1463735 <https://reviews.llvm.org/D32530#1463735>, @joelkevinjones wrote:
> >
> > > I think this is a coherent set of changes. Given the current top of trunk, this expands support from just assembly/disassembly of machine instructions to include LLVM IR, right? Such being the case, I think this patch should go in. I have some ideas on how to structure passes so SV IR supporting optimizations can be added incrementally. If anyone thinks such a proposal would help, let me know.
> >
> >
> > I think there is one more thing we still have to do. Does scalable vector type apply to all Instructions where non-scalable vector is allowed? If the answer is no, we need to identify which ones are not allowed to take scalable vector type operand/result. Some of the Instructions are not plain element-wise operation. Do we have agreed upon semantics for all those that are allowed?
>
>
> The main difference is for 'shufflevector'. For a splat it's simple, since you just use a zeroinitializer mask. For anything else, though, you currently need a constant vector with immediate values; this obviously won't work if you don't know how many elements there are.


We need to clarify on insertelement/extractelement. Maybe already done in some other patches, but that clarification should be part of this patch.
Is the "length of val" under the semantics "scalable * n" in <scalable n x ElemTy>, right? Or is it still n?

Going with length of val being "scalable * n", if there is an optimization that takes advantages of poison value being returned by evaluating "idx >= n" at compile time, we need to disable that for scalable vector. Also, if any verifier is checking whether constant idx value is less than n, we need to disable that for scalable vector.


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

https://reviews.llvm.org/D32530





More information about the llvm-commits mailing list