On Thu, Aug 21, 2025 at 06:26:16PM +0530, jeevitha wrote:
> 
> Hi All,
> 
> The following patch has been bootstrapped and regtested on powerpc64le-linux.
> 
> Disable easy_vector_constant_msb and easy_vector_constant_add_self splitters 
> on
> POWER10.  On POWER9, bypass these splitters when xxspltib can directly 
> generate
> 8-bit signed constants, for avoiding redundant vaddubm/vslb sequences.  For
> word constants on POWER9, retain the splitters since xxspltiw is not 
> available.
> 
> 2025-07-21  Jeevitha Palanisamy  <[email protected]>
> 
> gcc/
>       PR target/118480
>       * config/rs6000/altivec.md (easy_vector_constant_msb splitter): Disable
>       on POWER10, and on POWER9 when xxspltib can generate the constant.
>       (easy_vector_constant_add_self splitter): Likewise
> 
> gcc/testsuite/
>       PR target/118480
>       * gcc.target/powerpc/pr118480-1.c: New
>       * gcc.target/powerpc/pr118480-2.c: New
>       * gcc.target/powerpc/vec-splat-constant-v4sf.c: Adjust test to handle
>       failed case by msb splitter.
> 

Rather than using !TARGET_POWER10, I think a better test is
!TARGET_PREFIXED, since if people use the -mno-prefixed option, it will
disable generation of the TARGET_XXSPLTI{W,DP} instructions.

Other than that it looks good.

-- 
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: [email protected]

Reply via email to