From: Tamar Christina Date: Mon, 1 Nov 2021 13:42:51 +0000 (+0000) Subject: testsuite: fix failing complex add testcases PR103000 X-Git-Tag: basepoints/gcc-13~3487 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a260d652c421e212818efc3c0f487cf9cdbcc2c;p=thirdparty%2Fgcc.git testsuite: fix failing complex add testcases PR103000 Some targets have overriden the default unroll factor and so do not have enough data to succeed for SLP vectorization if loop vect is turned off. To fix this just always unroll in these testcases. gcc/testsuite/ChangeLog: PR testsuite/103000 * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c: Force unroll. * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c: likewise * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c: Likewise * gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c: Likewise. --- diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c index 4445119fc9d2..23f179a55dcf 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-double.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ +/* { dg-require-effective-target vect_double } */ /* { dg-add-options arm_v8_3a_complex_neon } */ -/* { dg-additional-options "-fno-tree-loop-vectorize" } */ +/* { dg-additional-options "-fno-tree-loop-vectorize -funroll-loops" } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE double diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c index ff53719d1a89..cc7715160981 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ +/* { dg-require-effective-target vect_float } */ /* { dg-add-options arm_v8_3a_complex_neon } */ -/* { dg-additional-options "-fno-tree-loop-vectorize" } */ +/* { dg-additional-options "-fno-tree-loop-vectorize -funroll-loops" } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE float diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c index 8bc7117565e7..fb6a1676fb4b 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-float.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ +/* { dg-require-effective-target vect_float } */ /* { dg-add-options arm_v8_3a_complex_neon } */ -/* { dg-additional-options "-fno-tree-loop-vectorize" } */ +/* { dg-additional-options "-fno-tree-loop-vectorize -funroll-loops" } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE float diff --git a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c index 80e0f5d54123..4bb106a3d520 100644 --- a/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c +++ b/gcc/testsuite/gcc.dg/vect/complex/fast-math-bb-slp-complex-add-pattern-half-float.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ +/* { dg-require-effective-target vect_complex_add_half } */ /* { dg-add-options arm_v8_3a_fp16_complex_neon } */ -/* { dg-additional-options "-fno-tree-loop-vectorize" } */ +/* { dg-additional-options "-fno-tree-loop-vectorize -funroll-loops" } */ /* { dg-add-options arm_v8_1m_mve_fp } */ #define TYPE _Float16 @@ -8,6 +9,6 @@ #include "complex-add-pattern-template.c" /* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT90" 1 "slp1" { target { vect_complex_add_half } } } } */ -/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_byte } && ! target { arm*-*-* } } } } */ +/* { dg-final { scan-tree-dump-times "stmt.*COMPLEX_ADD_ROT270" 1 "slp1" { target { vect_complex_add_half } && ! target { arm*-*-* } } } } */ /* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT270" "slp1" { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump "Found COMPLEX_ADD_ROT90" "slp1" } } */