[llvm-dev] [RFC] Vector Predication
David Greene via llvm-dev
llvm-dev at lists.llvm.org
Thu Feb 7 09:08:51 PST 2019
Jacob Lifshay <programmerjake at gmail.com> writes:
> So it would be handy for the vector length on evl intrinsics to be in
> units of the mask length so we don't have to pattern match a division
> in the backend. We could have 2 variants of the vector length
> argument, one in terms of the data vector and one in terms of the mask
> vector. we could legalize the mask vector variant for those
> architectures that need it by pulling the multiplication out and
> switching to the data vector variants.
Would it make sense to have two different intrinsics?
# "Normal" form, L is in terms of flat vector length.
<scalable 2 x float> evl.fsub(<scalable 2 x float> %x,
<scalable 2 x float> %y,
<scalable 2 x i1> %M, i32 %L)
# "Sub-vector" form, L is in terms of sub-vectors elements.
<scalable 1 x <2 x float>> evl.fsub(<scalable 1 x <2 x float>> %x,
<scalable 1 x <2 x float>> %y,
<scalable 1 x <2 x i1>> %M, i32 %L
Overloading types to mean two very different things is confusing to me.
More information about the llvm-dev