diff options
author | Lehua Ding <lehua.ding@rivai.ai> | 2023-06-09 07:27:01 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2023-06-09 07:29:14 -0600 |
commit | 45b7da5f4951c3e9e5187487d611d16ff8cf148f (patch) | |
tree | 743056acf657970c6d83fa4fa6597b44feb437aa /gcc | |
parent | 00da6bcfccbc5ab13821d8dd7334dd48c22d5702 (diff) | |
download | gcc-45b7da5f4951c3e9e5187487d611d16ff8cf148f.zip gcc-45b7da5f4951c3e9e5187487d611d16ff8cf148f.tar.gz gcc-45b7da5f4951c3e9e5187487d611d16ff8cf148f.tar.bz2 |
testsuite: fix the condition bug in tsvc s176
This patch fixes the problem that the loop in the tsvc s176 function is
optimized and removed because `iterations/LEN_1D` is 0 (where iterations
is set to 10000, LEN_1D is set to 32000 in tsvc.h).
This testcase passed on x86 and AArch64 system.
Best,
Lehua
gcc/testsuite/ChangeLog:
* gcc.dg/vect/tsvc/vect-tsvc-s176.c: Adjust iterations.
* gcc.dg/vect/tsvc/tsvc.h: Adjust expected rsult for s176.
Diffstat (limited to 'gcc')
-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 | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h index cd39c04..d910c38 100644 --- a/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h +++ b/gcc/testsuite/gcc.dg/vect/tsvc/tsvc.h @@ -1164,7 +1164,7 @@ real_t get_expected_result(const char * name) } else if (!strcmp(name, "s175")) { return 32009.023438f; } else if (!strcmp(name, "s176")) { - return 32000.f; + return 32063.902344f; } else if (!strcmp(name, "s211")) { return 63983.308594f; } else if (!strcmp(name, "s212")) { 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 79faf7f..365e520 100644 --- a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s176.c +++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s176.c @@ -14,7 +14,7 @@ real_t s176(struct args_t * func_args) initialise_arrays(__func__); int m = LEN_1D/2; - for (int nl = 0; nl < 4*(iterations/LEN_1D); nl++) { + for (int nl = 0; nl < 4*(10*iterations/LEN_1D); nl++) { for (int j = 0; j < (LEN_1D/2); j++) { for (int i = 0; i < m; i++) { a[i] += b[i+m-j-1] * c[j]; @@ -39,4 +39,4 @@ int main (int argc, char **argv) return 0; } -/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */ |