[1/3] testsuite: Add check for vectors of 128 bits being supported

Message ID alpine.DEB.2.20.2307062144220.28892@tpp.orcam.me.uk
State Accepted
Headers
Series testsuite: Exclude vector tests for unsupported targets |

Checks

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

Commit Message

Maciej W. Rozycki July 6, 2023, 9:35 p.m. UTC
  Similarly to checks for vectors of 32 bits and 64 bits being supported 
add one for vectors of 128 bits.

	gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_vect128): New 
	procedure.
---
 gcc/testsuite/lib/target-supports.exp |    6 ++++++
 1 file changed, 6 insertions(+)

gcc-test-effective-target-vect128.diff
  

Comments

Richard Biener July 7, 2023, 6:24 a.m. UTC | #1
On Thu, Jul 6, 2023 at 11:36 PM Maciej W. Rozycki <macro@embecosm.com> wrote:
>
> Similarly to checks for vectors of 32 bits and 64 bits being supported
> add one for vectors of 128 bits.

OK

>         gcc/testsuite/
>         * lib/target-supports.exp (check_effective_target_vect128): New
>         procedure.
> ---
>  gcc/testsuite/lib/target-supports.exp |    6 ++++++
>  1 file changed, 6 insertions(+)
>
> gcc-test-effective-target-vect128.diff
> Index: gcc/gcc/testsuite/lib/target-supports.exp
> ===================================================================
> --- gcc.orig/gcc/testsuite/lib/target-supports.exp
> +++ gcc/gcc/testsuite/lib/target-supports.exp
> @@ -8599,6 +8599,12 @@ proc check_effective_target_vect_variabl
>      return [expr { [lindex [available_vector_sizes] 0] == 0 }]
>  }
>
> +# Return 1 if the target supports vectors of 128 bits.
> +
> +proc check_effective_target_vect128 { } {
> +    return [expr { [lsearch -exact [available_vector_sizes] 128] >= 0 }]
> +}
> +
>  # Return 1 if the target supports vectors of 64 bits.
>
>  proc check_effective_target_vect64 { } {
  
Maciej W. Rozycki July 11, 2023, 3 p.m. UTC | #2
On Fri, 7 Jul 2023, Richard Biener wrote:

> > Similarly to checks for vectors of 32 bits and 64 bits being supported
> > add one for vectors of 128 bits.
> 
> OK

 Thanks for the review, however this is only needed for 2/3 at this point, 
so I'll only push it if 2/3 gets a go-ahead (and still needs this change).

  Maciej
  

Patch

Index: gcc/gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc.orig/gcc/testsuite/lib/target-supports.exp
+++ gcc/gcc/testsuite/lib/target-supports.exp
@@ -8599,6 +8599,12 @@  proc check_effective_target_vect_variabl
     return [expr { [lindex [available_vector_sizes] 0] == 0 }]
 }
 
+# Return 1 if the target supports vectors of 128 bits.
+
+proc check_effective_target_vect128 { } {
+    return [expr { [lsearch -exact [available_vector_sizes] 128] >= 0 }]
+}
+
 # Return 1 if the target supports vectors of 64 bits.
 
 proc check_effective_target_vect64 { } {