[llvm-dev] [RFC] Vector Predication

Simon Moll via llvm-dev llvm-dev at lists.llvm.org
Thu Feb 7 09:03:10 PST 2019

On 2/7/19 5:56 PM, David Greene wrote:
> 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

We have agreed to interpret vlen elementwise by now. Let's keep 
discussing that in the RFC so everything is in one place.

I've summarized the current state there: 


- Simon


Simon Moll
Researcher / PhD Student

Compiler Design Lab (Prof. Hack)
Saarland University, Computer Science
Building E1.3, Room 4.31

Tel. +49 (0)681 302-57521 : moll at cs.uni-saarland.de
Fax. +49 (0)681 302-3065  : http://compilers.cs.uni-saarland.de/people/moll

More information about the llvm-dev mailing list