comparison gcc/testsuite/c-c++-common/goacc/kernels-counter-var-redundant-load.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* { dg-additional-options "-O2" } */
2 /* { dg-additional-options "-fdump-tree-dom3" } */
3
4 #include <stdlib.h>
5
6 #define N (1024 * 512)
7 #define COUNTERTYPE unsigned int
8
9 COUNTERTYPE
10 foo (unsigned int *c)
11 {
12 COUNTERTYPE ii;
13
14 #pragma acc kernels copyout (c[0:N])
15 {
16 for (ii = 0; ii < N; ii++)
17 c[ii] = 1;
18 }
19
20 return ii;
21 }
22
23 /* We're expecting:
24
25 .omp_data_i_10 = &.omp_data_arr.3;
26 _11 = .omp_data_i_10->ii;
27 *_11 = 0;
28 _15 = .omp_data_i_10->c;
29 c.1_16 = *_15;
30
31 Check that there's only one load from anonymous ssa-name (which we assume to
32 be the one to read c), and that there's no such load for ii. */
33
34 /* { dg-final { scan-tree-dump-times "(?n)\\*_\[0-9\]\[0-9\]*;$" 1 "dom3" } } */