[PATCH 2/2] rs6000: Define define_insn_and_split to split unspec sldi+or to rldimi
Segher Boessenkool
segher@kernel.crashing.org
Sat Jul 11 00:28:07 GMT 2020
Hi!
On Thu, Jul 09, 2020 at 09:14:45PM -0500, Xiong Hu Luo wrote:
> * config/rs6000/rs6000.md (rotl_unspec): New
> define_insn_and_split.
> +; rldimi with UNSPEC_SI_FROM_SF.
> +(define_insn_and_split "*rotl_unspec"
Please have rotldi3_insert in the name. "unspec" in the name doesn't
really mean much... Can you put "sf" in the name, instead? So something
like "*rotldi3_insert_sf"?
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/vector_float.c
> @@ -0,0 +1,14 @@
> +/* { dg-do compile } */
> +/* { dg-options "-O2 -mdejagnu-cpu=power9" } */
This needs p9vector_ok (yes, that name doesn't make too much sense).
> +vector float
> +test (float *a, float *b, float *c, float *d)
> +{
> + return (vector float){*a, *b, *c, *d};
> +}
> +
> +/* { dg-final { scan-assembler-not {\mlxsspx\M} } } */
> +/* { dg-final { scan-assembler-not {\mlfs\M} } } */
No lxssp or lfsx either... or the update forms...
/* { dg-final { scan-assembler-not {\mlxssp} } } */
/* { dg-final { scan-assembler-not {\mlfs} } } */
works fine (there are no other mnemonics starting with those strings).
> +/* { dg-final { scan-assembler-times {\mlwz\M} 4 } } */
> +/* { dg-final { scan-assembler-times {\mrldimi\M} 2 } } */
> +/* { dg-final { scan-assembler-times {\mmtvsrdd\M} 1 } } */
Okay for trunk with those changes (or post again if you prefer). Thanks!
Segher
More information about the Gcc-patches
mailing list