]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix gcc.dg/vect/bb-slp-subgroups-2.c with 256bit vectors
authorRichard Biener <rguenther@suse.de>
Mon, 21 Aug 2023 11:56:34 +0000 (13:56 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 21 Aug 2023 11:58:52 +0000 (13:58 +0200)
The following adds vect128, vect256 and vect512 effective targets
and adjusts gcc.dg/vect/bb-slp-subgroups-2.c accordingly.

gcc/testsuite/
* lib/target-supports.exp: Add vect128, vect256 and vect512
effective targets.
* gcc.dg/vect/bb-slp-subgroups-2.c: Properly handle the
vect256 case.

gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-2.c
gcc/testsuite/lib/target-supports.exp

index ead8d92f202eb3a2f532a16bd5e6c860d0a093ea..9431bcb9d5c4744adeeca7d0bd1f011079149333 100644 (file)
@@ -39,4 +39,5 @@ main (int argc, char **argv)
 }
 
 /* { dg-final { scan-tree-dump-times "Basic block will be vectorized using SLP" 1 "slp2" } } */
-/* { dg-final { scan-tree-dump-times "optimized: basic block" 2 "slp2" } } */
+/* { dg-final { scan-tree-dump-times "optimized: basic block" 2 "slp2" { target { ! vect256 } } } } */
+/* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "slp2" { target { vect256 } } } } */
index 5b5f865518443df6d04ebe20fac30cebf4afc812..d4623ee6b455ca07f18a9707a140bb04712289a3 100644 (file)
@@ -8634,6 +8634,24 @@ proc check_effective_target_vect_variable_length { } {
     return [expr { [lindex [available_vector_sizes] 0] == 0 }]
 }
 
+# Return 1 if the target supports vectors of 512 bits.
+
+proc check_effective_target_vect512 { } {
+    return [expr { [lsearch -exact [available_vector_sizes] 512] >= 0 }]
+}
+
+# Return 1 if the target supports vectors of 256 bits.
+
+proc check_effective_target_vect256 { } {
+    return [expr { [lsearch -exact [available_vector_sizes] 256] >= 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 { } {