diff options
author | Joern Rennecke <joern.rennecke@riscy-ip.com> | 2024-08-28 01:46:25 +0100 |
---|---|---|
committer | Joern Rennecke <joern.rennecke@riscy-ip.com> | 2024-08-28 01:48:37 +0100 |
commit | beb94f5979953969593a2387561cdbc8fedfaeb1 (patch) | |
tree | 260667df34cf9559c67e7a8be70e420223af1af0 | |
parent | 3989e31d867b3505f847ecb6d870eacacfdf47bf (diff) | |
download | gcc-beb94f5979953969593a2387561cdbc8fedfaeb1.zip gcc-beb94f5979953969593a2387561cdbc8fedfaeb1.tar.gz gcc-beb94f5979953969593a2387561cdbc8fedfaeb1.tar.bz2 |
Fix PR testsuite/116271, gcc.dg/vect/tsvc/vect-tsvc-s176.c fails
gcc/testsuite:
PR testsuite/116271
* gcc.dg/vect/tsvc/vect-tsvc-s176.c [TRUNCATE_TEST]: Make sure
that m stays the same as the loop bound of the middle loop.
* gcc.dg/vect/tsvc/tsvc.h (get_expected_result) <s176> [TRUNCATE_TEST]:
Adjust expected value.
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s176.c | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h index cc02e4c..4d295d1 100644 --- a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h +++ b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h @@ -1727,7 +1727,7 @@ real_t get_expected_result(const char * name) #ifndef TRUNCATE_TEST return 32021.121094f; #else /* TRUNCATE_TEST */ - return 32024.082031f; + return 32023.751953f; #endif /* TRUNCATE_TEST */ #endif /* iterations */ } else { diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s176.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s176.c index 6e95805..626692b 100644 --- a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s176.c +++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s176.c @@ -15,18 +15,20 @@ real_t s176(struct args_t * func_args) initialise_arrays(__func__); - int m = LEN_1D/2; #ifdef TRUNCATE_TEST - /* Do something equivalent to if (1) which the compiler is unlikely to - figure out. - FUNC_ARGS is in the caller's frame, so it shouldn't be between A and B. - */ - if ((void *)func_args <= (void *)a || (void *)func_args >= (void *)b) - m = 32; +/* Reduce the iteration counts without changing what is a variable and + what is a constant expression. + 32000/25 == 640, i.e. it still has a nice power of two factor, but is + not a power of two itself, and still somewhat large-ish, so hopefully + this won't perturb the vectorizer decisions much. */ +#define M_CONST LEN_1D/50 +#else +#define M_CONST LEN_1D/2 #endif + int m = M_CONST; for (int nl = 0; nl < 4*(10*iterations/LEN_1D); nl++) { - for (int j = 0; j < (LEN_1D/2); j++) { + for (int j = 0; j < (M_CONST); j++) { for (int i = 0; i < m; i++) { a[i] += b[i+m-j-1] * c[j]; } |