xxpermdi (and rldic) instruction counts are slightly lower than expected, because icf turns insert_di_0_v2 into a insert_di_0 tail call. Adjust.
Tested with gcc-14 targeting ppc-vx7r2 and ppc64-vx7r2. Also tested with trunk on ppc64le-linux-gnu, and with gcc-14 targeting powerpc-elf. Ok to install? for gcc/testsuite/ChangeLog * gcc.target/powerpc/vsx-builtin-7.c: Adjust expected counts. --- gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c index 4de240c6a95d8..832a365dd3946 100644 --- a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c +++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-7.c @@ -192,10 +192,11 @@ vector unsigned __int128 splat_uint128 (unsigned __int128 x) { return vec_splats */ /* { dg-final { scan-assembler-times {\mrldic\M} 0 { target { be && ilp32 } } } } */ -/* { dg-final { scan-assembler-times {\mrldic\M} 65 { target { be && lp64 } } } } */ -/* { dg-final { scan-assembler-times {\mrldic\M} 65 { target le } } } */ -/* { dg-final { scan-assembler-times "xxpermdi" 33 { target be } } } */ -/* { dg-final { scan-assembler-times "xxpermdi" 35 { target le } } } */ +/* { dg-final { scan-assembler-times {\mrldic\M} 64 { target { be && lp64 } } } } */ +/* { dg-final { scan-assembler-times {\mrldic\M} 64 { target le } } } */ +/* { dg-final { scan-assembler-times "xxpermdi" 32 { target ilp32 } } } */ +/* { dg-final { scan-assembler-times "xxpermdi" 32 { target { be && lp64 } } } } */ +/* { dg-final { scan-assembler-times "xxpermdi" 34 { target { le && lp64 } } } } */ /* { dg-final { scan-assembler-times "vspltisb" 2 } } */ /* { dg-final { scan-assembler-times "vspltish" 2 } } */ /* { dg-final { scan-assembler-times "vspltisw" 2 { target be } } } */ -- Alexandre Oliva, happy hacker https://blog.lx.oliva.nom.br/ Free Software Activist FSFLA co-founder GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity. Excluding neuro-others for not behaving ""normal"" is *not* inclusive!