[llvm-dev] [RFC] Vector Predication

David Greene via llvm-dev llvm-dev at lists.llvm.org
Thu Feb 7 08:56:30 PST 2019


Simon Moll <moll at cs.uni-saarland.de> writes:

> In unscaled IR types, this means VL masks each scalar result, in
> scaled types VL masks sub vectors. E.g. for %L == 1 the following call
> produces a pair of floats as the result:
>
>    <scalable 2 x float> evl.fsub(<scalable 2 x float> %x, <scalable 2 x float> %y, <scalable 2 x i1> %M, i32 %L)

That seems wrong to me.  In the SVE proposal, <scalable 2 x float> means
a dynamic vector length guaranteed to be a multiple of 2 floats long.
There is no notion of sub-vector.  The vector length parameter should
result in <scalable 2 x float> result, but where the second float value
is undefined.  It would be surprising to get two full results.  If
sub-vector types were notated as <scalable 1 x <2 x float>> then %L == 1
would result in two full float results.

                            -David


More information about the llvm-dev mailing list