From 8a260d652c421e212818efc3c0f487cf9cdbcc2c Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Mon, 1 Nov 2021 13:42:51 +0000 Subject: [PATCH] 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. --- .../vect/complex/fast-math-bb-slp-complex-add-double.c | 3 ++- .../gcc.dg/vect/complex/fast-math-bb-slp-complex-add-float.c | 3 ++- .../complex/fast-math-bb-slp-complex-add-pattern-float.c | 3 ++- .../fast-math-bb-slp-complex-add-pattern-half-float.c | 5 +++-- 4 files changed, 9 insertions(+), 5 deletions(-) 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 4445119fc9d..23f179a55dc 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 ff53719d1a8..cc771516098 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 8bc7117565e..fb6a1676fb4 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 80e0f5d5412..4bb106a3d52 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" } } */