testsuite: Adjust vect-bitfield-read-* with vect_shift and vect_long_long [PR107240]

Message ID bc97e1d1-e256-d887-9a52-bef93e70d260@linux.ibm.com
State Accepted
Headers
Series testsuite: Adjust vect-bitfield-read-* with vect_shift and vect_long_long [PR107240] |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Kewen.Lin Oct. 27, 2022, 7:09 a.m. UTC
  Hi,

The test cases vect-bitfield-read-* requires vector shift
target support, they need one explicit vect_shift effective
target requirement checking.  Besides, the vectype for struct
in test cases vect-bitfield-read-{2,4} is vector of long long,
we need to check effective target vect_long_long for them.
This patch can help to fix remaining vect-bitfield-* test
failures on powerpc.

Tested on powerpc64-linux-gnu P7 and P8, as well as
powerpc64le-linux-gnu P9 and P10.

Is it ok for trunk?

BR,
Kewen
-----
	PR testsuite/107240

gcc/testsuite/ChangeLog:

	* gcc.dg/vect/vect-bitfield-read-1.c: Add effective target checking
	vect_shift.
	* gcc.dg/vect/vect-bitfield-read-3.c: Likewise.
	* gcc.dg/vect/vect-bitfield-read-5.c: Likewise.
	* gcc.dg/vect/vect-bitfield-read-6.c: Likewise.
	* gcc.dg/vect/vect-bitfield-read-7.c: Likewise.
	* gcc.dg/vect/vect-bitfield-read-2.c: Add effective target checking
	vect_shift and replace vect_int with vect_long_long.
	* gcc.dg/vect/vect-bitfield-read-4.c: Likewise.
---
 gcc/testsuite/gcc.dg/vect/vect-bitfield-read-1.c | 1 +
 gcc/testsuite/gcc.dg/vect/vect-bitfield-read-2.c | 3 ++-
 gcc/testsuite/gcc.dg/vect/vect-bitfield-read-3.c | 1 +
 gcc/testsuite/gcc.dg/vect/vect-bitfield-read-4.c | 3 ++-
 gcc/testsuite/gcc.dg/vect/vect-bitfield-read-5.c | 1 +
 gcc/testsuite/gcc.dg/vect/vect-bitfield-read-6.c | 1 +
 gcc/testsuite/gcc.dg/vect/vect-bitfield-read-7.c | 1 +
 7 files changed, 9 insertions(+), 2 deletions(-)

--
2.27.0
  

Comments

Richard Biener Oct. 27, 2022, 7:26 a.m. UTC | #1
> Am 27.10.2022 um 09:10 schrieb Kewen.Lin <linkw@linux.ibm.com>:
> 
> Hi,
> 
> The test cases vect-bitfield-read-* requires vector shift
> target support, they need one explicit vect_shift effective
> target requirement checking.  Besides, the vectype for struct
> in test cases vect-bitfield-read-{2,4} is vector of long long,
> we need to check effective target vect_long_long for them.
> This patch can help to fix remaining vect-bitfield-* test
> failures on powerpc.
> 
> Tested on powerpc64-linux-gnu P7 and P8, as well as
> powerpc64le-linux-gnu P9 and P10.
> 
> Is it ok for trunk?

Ok

Thanks, Richard 

> BR,
> Kewen
> -----
>    PR testsuite/107240
> 
> gcc/testsuite/ChangeLog:
> 
>    * gcc.dg/vect/vect-bitfield-read-1.c: Add effective target checking
>    vect_shift.
>    * gcc.dg/vect/vect-bitfield-read-3.c: Likewise.
>    * gcc.dg/vect/vect-bitfield-read-5.c: Likewise.
>    * gcc.dg/vect/vect-bitfield-read-6.c: Likewise.
>    * gcc.dg/vect/vect-bitfield-read-7.c: Likewise.
>    * gcc.dg/vect/vect-bitfield-read-2.c: Add effective target checking
>    vect_shift and replace vect_int with vect_long_long.
>    * gcc.dg/vect/vect-bitfield-read-4.c: Likewise.
> ---
> gcc/testsuite/gcc.dg/vect/vect-bitfield-read-1.c | 1 +
> gcc/testsuite/gcc.dg/vect/vect-bitfield-read-2.c | 3 ++-
> gcc/testsuite/gcc.dg/vect/vect-bitfield-read-3.c | 1 +
> gcc/testsuite/gcc.dg/vect/vect-bitfield-read-4.c | 3 ++-
> gcc/testsuite/gcc.dg/vect/vect-bitfield-read-5.c | 1 +
> gcc/testsuite/gcc.dg/vect/vect-bitfield-read-6.c | 1 +
> gcc/testsuite/gcc.dg/vect/vect-bitfield-read-7.c | 1 +
> 7 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-1.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-1.c
> index 01cf34fb444..42e50d9f0c8 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-1.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-1.c
> @@ -1,4 +1,5 @@
> /* { dg-require-effective-target vect_int } */
> +/* { dg-require-effective-target vect_shift } */
> 
> #include <stdarg.h>
> #include "tree-vect.h"
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-2.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-2.c
> index 1a4a1579c14..a9aeefcd72c 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-2.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-2.c
> @@ -1,4 +1,5 @@
> -/* { dg-require-effective-target vect_int } */
> +/* { dg-require-effective-target vect_shift } */
> +/* { dg-require-effective-target vect_long_long } */
> 
> #include <stdarg.h>
> #include "tree-vect.h"
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-3.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-3.c
> index 849f4a017e1..c7d0fd26bad 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-3.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-3.c
> @@ -1,4 +1,5 @@
> /* { dg-require-effective-target vect_int } */
> +/* { dg-require-effective-target vect_shift } */
> 
> #include <stdarg.h>
> #include "tree-vect.h"
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-4.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-4.c
> index 5bc9c412e96..6a3ed8c0c6f 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-4.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-4.c
> @@ -1,4 +1,5 @@
> -/* { dg-require-effective-target vect_int } */
> +/* { dg-require-effective-target vect_shift } */
> +/* { dg-require-effective-target vect_long_long } */
> 
> #include <stdarg.h>
> #include "tree-vect.h"
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-5.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-5.c
> index 1dc24d3eded..b2889df8a0a 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-5.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-5.c
> @@ -1,4 +1,5 @@
> /* { dg-require-effective-target vect_int } */
> +/* { dg-require-effective-target vect_shift } */
> 
> #include <stdarg.h>
> #include "tree-vect.h"
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-6.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-6.c
> index 7d24c299758..2445f531be2 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-6.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-6.c
> @@ -1,4 +1,5 @@
> /* { dg-require-effective-target vect_int } */
> +/* { dg-require-effective-target vect_shift } */
> 
> #include <stdarg.h>
> #include "tree-vect.h"
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-7.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-7.c
> index 3b505db2bd3..4b1ec8a6dab 100644
> --- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-7.c
> +++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-7.c
> @@ -1,4 +1,5 @@
> /* { dg-require-effective-target vect_int } */
> +/* { dg-require-effective-target vect_shift } */
> 
> #include <stdarg.h>
> #include "tree-vect.h"
> --
> 2.27.0
  

Patch

diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-1.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-1.c
index 01cf34fb444..42e50d9f0c8 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-1.c
@@ -1,4 +1,5 @@ 
 /* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_shift } */

 #include <stdarg.h>
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-2.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-2.c
index 1a4a1579c14..a9aeefcd72c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-2.c
@@ -1,4 +1,5 @@ 
-/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_shift } */
+/* { dg-require-effective-target vect_long_long } */

 #include <stdarg.h>
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-3.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-3.c
index 849f4a017e1..c7d0fd26bad 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-3.c
@@ -1,4 +1,5 @@ 
 /* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_shift } */

 #include <stdarg.h>
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-4.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-4.c
index 5bc9c412e96..6a3ed8c0c6f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-4.c
@@ -1,4 +1,5 @@ 
-/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_shift } */
+/* { dg-require-effective-target vect_long_long } */

 #include <stdarg.h>
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-5.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-5.c
index 1dc24d3eded..b2889df8a0a 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-5.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-5.c
@@ -1,4 +1,5 @@ 
 /* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_shift } */

 #include <stdarg.h>
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-6.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-6.c
index 7d24c299758..2445f531be2 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-6.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-6.c
@@ -1,4 +1,5 @@ 
 /* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_shift } */

 #include <stdarg.h>
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-7.c b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-7.c
index 3b505db2bd3..4b1ec8a6dab 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-7.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-bitfield-read-7.c
@@ -1,4 +1,5 @@ 
 /* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_shift } */

 #include <stdarg.h>
 #include "tree-vect.h"