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

--- Comment #4 from Michael Meissner <meissner at gcc dot gnu.org> ---
Note, this code only shows up when the target CPU is power8.

For the following code:

vector long long lsb64()
{
   return vec_splats(1LL);
}

Both power9 and power10 generate:

        xxspltib 34,1
        vextsb2d 2,2

Now, if you want to add code for power8, you would:

1) Add code in rs6000.c's easy_altivec_constant (and possibly vsplitis_shifted
and other functions) to handle the operation on power8.

2) Then add the code in rs6000.c's gen_easy_altivec_constant to generate the
insns for this.  You might need to add explicit insns in altivec.md or vsx.md
for this optimization.

Reply via email to