Re: [PATCH] rs6000: Inefficient vector splat of small V2DI constants [PR107757]

2024-11-20 Thread Peter Bergner
On 11/20/24 4:53 AM, Surya Kumari Jangala wrote: > +++ b/gcc/testsuite/gcc.target/powerpc/pr107757-1.c > @@ -0,0 +1,14 @@ > +/* { dg-do compile } */ > +/* { dg-options "-mdejagnu-cpu=power8 -mvsx -O2" } */ > +/* { dg-require-effective-target powerpc_vsx } */ The -mvsx option is implied by -mcpu=po

[PATCH] rs6000: Inefficient vector splat of small V2DI constants [PR107757]

2024-11-20 Thread Surya Kumari Jangala
rs6000: Inefficient vector splat of small V2DI constants [PR107757] On P8, for vector splat of double word constants, specifically -1 and 1, gcc generates inefficient code. For -1, gcc generates two instructions (vspltisw and vupkhsw) whereas only one instruction (vspltisw) is sufficient. For cons