https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127157

--- Comment #3 from Avinash Jayakar <avinashd at gcc dot gnu.org> ---
Another issue mentioned in the guide is regarding the result type. vec_genpcvm
is intended to be used with vec_perm i.e., the permute control vector for the
vec_perm will be generated using vec_genpcvm.

Now the output of the vec_genpcvm is same as its input type. But the pcv type
is always vector unsigned char for vec_perm, so shouldn't the output type of
vec_genpcm also be vector unsigned char?

I think a much simpler option would be to use the following intrinsics and let
the user not worry about the immediate value
--------------------------------------------------------------------------------
vector unsigned char vec_genpcv_expand   (vector unsigned
char/short/int/double)
Generates xxgenpcv with immediate value 2(LE), 0(BE)

vector unsigned char vec_genpcv_compress (vector unsigned
char/short/int/double)
Generates xxgenpcv with immediate value 3(LE), 1(BE)
--------------------------------------------------------------------------------

With these intrinsics it will be much easier to program the examples mentioned
in Programming Note in Power ISA 3.1c document for this instruction, in both
targets.

Right now there is not way to generate the function mentioned in the example of
ISA document with just using these intrinsics in LE systems.

Reply via email to