]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
amdgcn: vector testsuite tweaks
authorAndrew Stubbs <ams@codesourcery.com>
Sat, 10 Sep 2022 22:47:19 +0000 (23:47 +0100)
committerAndrew Stubbs <ams@codesourcery.com>
Wed, 12 Oct 2022 10:43:39 +0000 (11:43 +0100)
The testsuite needs a few tweaks following my patches to add multiple vector
sizes for amdgcn.

gcc/testsuite/ChangeLog:

* gcc.dg/pr104464.c: Xfail on amdgcn.
* gcc.dg/signbit-2.c: Likewise.
* gcc.dg/signbit-5.c: Likewise.
* gcc.dg/vect/bb-slp-68.c: Likewise.
* gcc.dg/vect/bb-slp-cond-1.c: Change expectations on amdgcn.
* gcc.dg/vect/bb-slp-subgroups-3.c: Likewise.
* gcc.dg/vect/no-vfa-vect-depend-2.c: Change expectations for multiple
vector sizes.
* gcc.dg/vect/pr33953.c: Likewise.
* gcc.dg/vect/pr65947-12.c: Likewise.
* gcc.dg/vect/pr65947-13.c: Likewise.
* gcc.dg/vect/pr80631-2.c: Likewise.
* gcc.dg/vect/slp-reduc-4.c: Likewise.
* gcc.dg/vect/trapv-vect-reduc-4.c: Likewise.
* lib/target-supports.exp (available_vector_sizes): Add more sizes
for amdgcn.

15 files changed:
gcc/testsuite/ChangeLog.omp
gcc/testsuite/gcc.dg/pr104464.c
gcc/testsuite/gcc.dg/signbit-2.c
gcc/testsuite/gcc.dg/signbit-5.c
gcc/testsuite/gcc.dg/vect/bb-slp-68.c
gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c
gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c
gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c
gcc/testsuite/gcc.dg/vect/pr33953.c
gcc/testsuite/gcc.dg/vect/pr65947-12.c
gcc/testsuite/gcc.dg/vect/pr65947-13.c
gcc/testsuite/gcc.dg/vect/pr80631-2.c
gcc/testsuite/gcc.dg/vect/slp-reduc-4.c
gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
gcc/testsuite/lib/target-supports.exp

index e2e0a291d2163d0c666d4698a6e40a7d5520dd90..4f1976b82092a3c8f7b6c043382ca0cbf2af1544 100644 (file)
@@ -1,3 +1,25 @@
+2022-10-12  Andrew Stubbs  <ams@codesourcery.com>
+
+       Backport from mainline:
+       2022-10-11  Andrew Stubbs  <ams@codesourcery.com>
+
+       * gcc.dg/pr104464.c: Xfail on amdgcn.
+       * gcc.dg/signbit-2.c: Likewise.
+       * gcc.dg/signbit-5.c: Likewise.
+       * gcc.dg/vect/bb-slp-68.c: Likewise.
+       * gcc.dg/vect/bb-slp-cond-1.c: Change expectations on amdgcn.
+       * gcc.dg/vect/bb-slp-subgroups-3.c: Likewise.
+       * gcc.dg/vect/no-vfa-vect-depend-2.c: Change expectations for multiple
+       vector sizes.
+       * gcc.dg/vect/pr33953.c: Likewise.
+       * gcc.dg/vect/pr65947-12.c: Likewise.
+       * gcc.dg/vect/pr65947-13.c: Likewise.
+       * gcc.dg/vect/pr80631-2.c: Likewise.
+       * gcc.dg/vect/slp-reduc-4.c: Likewise.
+       * gcc.dg/vect/trapv-vect-reduc-4.c: Likewise.
+       * lib/target-supports.exp (available_vector_sizes): Add more sizes
+       for amdgcn.
+
 2022-10-06  Tobias Burnus  <tobias@codesourcery.com>
 
        Revert:
index ed6a22c39d5e6e1a8328a70fe1d24f9df16d3b66..d36a28678cb6f52fd3fb3aeb1460ece21e24b458 100644 (file)
@@ -9,3 +9,5 @@ foo(void)
 {
   f += (F)(f != (F){}[0]);
 }
+
+/* { dg-xfail-if "-fnon-call-exceptions unsupported" { amdgcn-*-* } } */
index 2f2dc448286e963b9a1bac9f4f84626baf4d0dde..99a455bc7d7aa3a3e8718c024c540e1b5beeb51e 100644 (file)
@@ -20,6 +20,7 @@ void fun2(int32_t *x, int n)
       x[i] = (-x[i]) >> 30;
 }
 
-/* { dg-final { scan-tree-dump {\s+>\s+\{ 0(, 0)+ \}} optimized { target vect_int } } } */
+/* Xfail amdgcn where vector truth type is not integer type.  */
+/* { dg-final { scan-tree-dump {\s+>\s+\{ 0(, 0)+ \}} optimized { target vect_int xfail amdgcn-*-* } } } */
 /* { dg-final { scan-tree-dump {\s+>\s+0} optimized { target { ! vect_int } } } } */
-/* { dg-final { scan-tree-dump-not {\s+>>\s+31} optimized } } */
+/* { dg-final { scan-tree-dump-not {\s+>>\s+31} optimized { xfail amdgcn-*-* } } } */
index 2b119cdfda7d2888f914633c809b0aa7da5244b7..0fad56c0ea85feb5dd59ee5b77f591e8e76934fe 100644 (file)
@@ -4,6 +4,7 @@
 /* This test does not work when the truth type does not match vector type.  */
 /* { dg-additional-options "-mno-avx512f" { target { i?86-*-* x86_64-*-* } } } */
 /* { dg-additional-options "-march=armv8-a" { target aarch64_sve } } */
+/* { dg-xfail-run-if "truth type does not match vector type" { amdgcn-*-* } } */
 
 
 #include <stdint.h>
index 8718031cc717b5d68c0e8fdaa866b6f8932b40e1..e7573a14933e7c8d18423db8579d60d8f466839f 100644 (file)
@@ -18,5 +18,6 @@ void foo ()
   x[9] = z[3] + 1.;
 }
 
-/* We want to have the store group split into 4, 2, 4 when using 32byte vectors.  */
-/* { dg-final { scan-tree-dump-not "from scalars" "slp2" } } */
+/* We want to have the store group split into 4, 2, 4 when using 32byte vectors.
+   Unfortunately it does not work when 64-byte vectors are available.  */
+/* { dg-final { scan-tree-dump-not "from scalars" "slp2" { xfail amdgcn-*-* } } } */
index 4bd286bf08c68961f78637693b05a092c8ffb0f7..1f5c621e5fd8ea46f3d7d78cd0cbbdb686fe92f3 100644 (file)
@@ -46,5 +46,6 @@ int main ()
 }
 
 /* { dg-final { scan-tree-dump {(no need for alias check [^\n]* when VF is 1|no alias between [^\n]* when [^\n]* is outside \(-16, 16\))} "vect" { target vect_element_align } } } */
-/* { dg-final { scan-tree-dump-times "loop vectorized" 1 "vect" { target vect_element_align } } } */
+/* { dg-final { scan-tree-dump-times "loop vectorized" 1 "vect" { target { vect_element_align && !amdgcn-*-* } } } } */
+/* { dg-final { scan-tree-dump-times "loop vectorized" 2 "vect" { target amdgcn-*-* } } } */
 
index 03c062ae6cfd3a5fb87db2bbc321c3675d1f25ab..fb719915db7016fe1922577bc408c64d2433af17 100644 (file)
@@ -42,4 +42,7 @@ main (int argc, char **argv)
 /* Because we disable the cost model, targets with variable-length
    vectors can end up vectorizing the store to a[0..7] on its own.
    With the cost model we do something sensible.  */
-/* { dg-final { scan-tree-dump-times "optimized: basic block" 2 "slp2" { xfail vect_variable_length } } } */
+/* { dg-final { scan-tree-dump-times "optimized: basic block" 2 "slp2" { target { ! amdgcn-*-* } xfail vect_variable_length } } } */
+
+/* amdgcn can do this in one vector.  */
+/* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "slp2" { target amdgcn-*-* } } } */
index 1880d1edb329b707489f85167d6a0063cdabeacd..89958378fca009fba6b59509c2ea7f96fa53805b 100644 (file)
@@ -51,4 +51,5 @@ int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "dependence distance negative" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "dependence distance negative" 1 "vect" { target { ! vect_multiple_sizes } } } } */
+/* { dg-final { scan-tree-dump "dependence distance negative" "vect" { target vect_multiple_sizes } } } */
index 4dd54cd57f3e4b0e7eb724d032b2c85d0bf6f736..d376cf904b72374ccf81028dbb1ed6ec0894c467 100644 (file)
@@ -29,6 +29,7 @@ void blockmove_NtoN_blend_noremap32 (const UINT32 *srcdata, int srcwidth,
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { ! vect_multiple_sizes } xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { target vect_multiple_sizes xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
 
 
index a47f4146a29a6d584a6a531dc22746f9d299cecb..9788eea0f54e0f22617687d52e1305f36731e7ae 100644 (file)
@@ -42,5 +42,6 @@ main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
-/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 2 "vect" { target vect_fold_extract_last } } } */
+/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 2 "vect" { target { vect_fold_extract_last && { ! vect_multiple_sizes } } } } } */
+/* { dg-final { scan-tree-dump "optimizing condition reduction with FOLD_EXTRACT_LAST" "vect" { target { vect_fold_extract_last && vect_multiple_sizes } } } } */
 /* { dg-final { scan-tree-dump-not "condition expression based on integer induction." "vect" } } */
index a703923151d74fc35bab877f56a8e58f5cc63b65..079b5f91ced188b16f42d690e9df3d8a289d2802 100644 (file)
@@ -44,4 +44,5 @@ main (void)
 
 /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
 /* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 2 "vect" { xfail vect_fold_extract_last } } } */
-/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 2 "vect" { target vect_fold_extract_last } } } */
+/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 2 "vect" { target { vect_fold_extract_last && { ! vect_multiple_sizes } } } } } */
+/* { dg-final { scan-tree-dump "optimizing condition reduction with FOLD_EXTRACT_LAST" "vect" { target { vect_fold_extract_last && vect_multiple_sizes } } } } */
index 61e11316af2c08dc8aaf703dd19d67e7a37b4c02..4e58627517676f73d7ba8cf06a24fdce6b9698dc 100644 (file)
@@ -75,4 +75,5 @@ main ()
 
 /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 5 "vect" { target vect_condition } } } */
 /* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 5 "vect" { target vect_condition xfail vect_fold_extract_last } } } */
-/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 5 "vect" { target vect_fold_extract_last } } } */
+/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 5 "vect" { target { { ! vect_multiple_sizes } && vect_fold_extract_last } } } } */
+/* { dg-final { scan-tree-dump "optimizing condition reduction with FOLD_EXTRACT_LAST" "vect" { target { vect_multiple_sizes && vect_fold_extract_last } } } } */
index cffb0114bcbed3709c1f0dab7d69c3ec995ebdd8..15f5c259e980cdea2a6f459062e527dd9dd59b53 100644 (file)
@@ -59,6 +59,7 @@ int main (void)
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
 /* For variable-length SVE, the number of scalar statements in the
    reduction exceeds the number of elements in a 128-bit granule.  */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail { vect_no_int_min_max || { aarch64_sve && vect_variable_length } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { ! vect_multiple_sizes } xfail { vect_no_int_min_max || { aarch64_sve && vect_variable_length } } } } } */
+/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { target { vect_multiple_sizes } } } } */
 /* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 0 "vect" { xfail { aarch64_sve && vect_variable_length } } } } */
 
index f09c964fdc185255d9f2435e7f647583615841ae..24cf1f793c7f15911f7866260dd4e510c48adc1a 100644 (file)
@@ -50,6 +50,7 @@ int main (void)
 
 /* We can't handle the first loop with variable-length vectors and so
    fall back to the fixed-length mininum instead.  */
-/* { dg-final { scan-tree-dump-times "Detected reduction\\." 3 "vect" { xfail vect_variable_length } } } */
+/* { dg-final { scan-tree-dump-times "Detected reduction\\." 3 "vect" { target { ! vect_multiple_sizes } xfail vect_variable_length } } } */
+/* { dg-final { scan-tree-dump "Detected reduction\\." "vect" { target vect_multiple_sizes } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { target { ! vect_no_int_min_max } } } } */
 /* { dg-final { scan-tree-dump-times {using an in-order \(fold-left\) reduction} 1 "vect" } } */
index a2f3a10643c5c270c922068c3de22a50aac6472b..e911b298f4ce7a35539b53f009772fffb026faba 100644 (file)
@@ -8329,7 +8329,8 @@ proc available_vector_sizes { } {
     } elseif { [istarget sparc*-*-*] } {
        lappend result 64
     } elseif { [istarget amdgcn*-*-*] } {
-       lappend result 4096
+        # 6 different lane counts, and 4 element sizes
+       lappend result 4096 2048 1024 512 256 128 64 32 16 8 4 2
     } else {
        # The traditional default asumption.
        lappend result 128