From df2c0060e5d1e0a37001b93f36e9245bb75ef33b Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Mon, 8 Jun 2020 22:34:21 +0000 Subject: [PATCH] rs6000/testsuite: Allow xxperm* instead of only vperm* Some testcases failed (esp. with --with-cpu=power9) after my change to prefer xxperm over vperm when all else is equal. Fix that. (This also tightens the relevant REs somewhat). 2020-06-09 Segher Boessenkool gcc/testsuite/ * gcc.target/powerpc/fold-vec-perm-char.c: Allow both vperm/vpermr and xxperm/xxpermr. * gcc.target/powerpc/fold-vec-perm-double.c: Ditto. * gcc.target/powerpc/fold-vec-perm-float.c: Ditto. * gcc.target/powerpc/fold-vec-perm-int.c: Ditto. * gcc.target/powerpc/fold-vec-perm-longlong.c: Ditto. * gcc.target/powerpc/fold-vec-perm-pixel.c: Ditto. * gcc.target/powerpc/fold-vec-perm-short.c: Ditto. * gcc.target/powerpc/lvsl-lvsr.c: Ditto. * gcc.target/powerpc/vec-mult-char-2.c: Ditto. * gcc.target/powerpc/vsx-vector-6.p9.c: Also allow xxpermr. --- gcc/testsuite/gcc.target/powerpc/fold-vec-perm-char.c | 2 +- gcc/testsuite/gcc.target/powerpc/fold-vec-perm-double.c | 2 +- gcc/testsuite/gcc.target/powerpc/fold-vec-perm-float.c | 2 +- gcc/testsuite/gcc.target/powerpc/fold-vec-perm-int.c | 2 +- gcc/testsuite/gcc.target/powerpc/fold-vec-perm-longlong.c | 2 +- gcc/testsuite/gcc.target/powerpc/fold-vec-perm-pixel.c | 2 +- gcc/testsuite/gcc.target/powerpc/fold-vec-perm-short.c | 2 +- gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c | 2 +- gcc/testsuite/gcc.target/powerpc/vec-mult-char-2.c | 2 +- gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p9.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-char.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-char.c index d907eaedf3d..56a89f3f79b 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-char.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-char.c @@ -28,4 +28,4 @@ testuc (vector unsigned char vuc2, vector unsigned char vuc3, return vec_perm (vuc2, vuc3, vuc); } -/* { dg-final { scan-assembler-times "vperm" 3 } } */ +/* { dg-final { scan-assembler-times {\m(?:v|xx)permr?\M} 3 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-double.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-double.c index 7ceca9ec26b..c982bc2232f 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-double.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-double.c @@ -14,4 +14,4 @@ testd (vector double vd2, vector double vd3, vector unsigned char vuc) return vec_perm (vd2, vd3, vuc); } -/* { dg-final { scan-assembler-times "vperm" 1 } } */ +/* { dg-final { scan-assembler-times {\m(?:v|xx)permr?\M} 1 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-float.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-float.c index c9cfb0ded9d..64b8ac78dea 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-float.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-float.c @@ -13,4 +13,4 @@ testf (vector float vf2, vector float vf3, vector unsigned char vuc) return vec_perm (vf2, vf3, vuc); } -/* { dg-final { scan-assembler-times "vperm" 1 } } */ +/* { dg-final { scan-assembler-times {\m(?:v|xx)permr?\M} 1 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-int.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-int.c index a2fdc26e5e3..a6dd59524cb 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-int.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-int.c @@ -28,4 +28,4 @@ testui (vector unsigned int vui2, vector unsigned int vui3, return vec_perm (vui2, vui3, vuc); } -/* { dg-final { scan-assembler-times "vperm" 3 } } */ +/* { dg-final { scan-assembler-times {\m(?:v|xx)permr?\M} 3 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-longlong.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-longlong.c index 1333d882e0e..3cc757da564 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-longlong.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-longlong.c @@ -29,4 +29,4 @@ testul (vector unsigned long long vul2, vector unsigned long long vul3, return vec_perm (vul2, vul3, vuc); } -/* { dg-final { scan-assembler-times "vperm" 3 } } */ +/* { dg-final { scan-assembler-times {\m(?:v|xx)permr?\M} 3 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-pixel.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-pixel.c index 0d3cb0aa123..54fccd26e01 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-pixel.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-pixel.c @@ -13,4 +13,4 @@ testpx (vector pixel px2, vector pixel px3, vector unsigned char vuc) return vec_perm (px2, px3, vuc); } -/* { dg-final { scan-assembler-times "vperm" 1 } } */ +/* { dg-final { scan-assembler-times {\m(?:v|xx)permr?\M} 1 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-short.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-short.c index de5303a8b4d..6a5d1a7df96 100644 --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-short.c +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-perm-short.c @@ -26,4 +26,4 @@ testus (vector unsigned short vus2, vector unsigned short vus3, vector unsigned return vec_perm (vus2, vus3, vuc); } -/* { dg-final { scan-assembler-times "vperm" 3 } } */ +/* { dg-final { scan-assembler-times {\m(?:v|xx)permr?\M} 3 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c b/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c index 6a7baf31b43..93843c09f35 100644 --- a/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c +++ b/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c @@ -7,7 +7,7 @@ /* { dg-final { scan-assembler-times "lvsl" 2 } } */ /* { dg-final { scan-assembler-times "lvsr" 2 } } */ /* { dg-final { scan-assembler-times {\mlxvd2x\M|\mlxv\M} 2 } } */ -/* { dg-final { scan-assembler-times "vperm" 2 } } */ +/* { dg-final { scan-assembler-times {\m(?:v|xx)permr?\M} 2 } } */ #include diff --git a/gcc/testsuite/gcc.target/powerpc/vec-mult-char-2.c b/gcc/testsuite/gcc.target/powerpc/vec-mult-char-2.c index 04c67109bef..dcfa270a1ee 100644 --- a/gcc/testsuite/gcc.target/powerpc/vec-mult-char-2.c +++ b/gcc/testsuite/gcc.target/powerpc/vec-mult-char-2.c @@ -18,4 +18,4 @@ vector signed char vmulsi(vector signed char v, /* { dg-final { scan-assembler-times "vmulesb" 2 } } */ /* { dg-final { scan-assembler-times "vmulosb" 2 } } */ -/* { dg-final { scan-assembler-times "vperm" 2 } } */ +/* { dg-final { scan-assembler-times {\m(?:v|xx)permr?\M} 2 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p9.c b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p9.c index 43d2e855e0d..2d81de1bea0 100644 --- a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p9.c +++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6.p9.c @@ -9,7 +9,7 @@ /* { dg-final { scan-assembler-times {\mvmaxub\M} 1 } } */ /* { dg-final { scan-assembler-times {\mvmsumshs\M} 1 } } */ /* { dg-final { scan-assembler-times {\mvmsumuhs\M} 1 } } */ -/* { dg-final { scan-assembler-times {\m(?:vpermr?|xxperm)\M} 1 } } */ +/* { dg-final { scan-assembler-times {\m(?:v|xx)permr?\M} 1 } } */ /* { dg-final { scan-assembler-times {\mxvabsdp\M} 1 } } */ /* { dg-final { scan-assembler-times {\mxvadddp\M} 1 } } */ /* { dg-final { scan-assembler-times {\mxvcmpeqdp\M} 9 } } */ -- 2.30.2