]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp: Scale type precision of collapsed iterator variable
authorKwok Cheung Yeung <kcy@codesourcery.com>
Mon, 1 Mar 2021 22:15:30 +0000 (14:15 -0800)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Fri, 5 Mar 2021 12:18:50 +0000 (04:18 -0800)
commit58def69b6d68276745e5cc14d6ca24ad47be5d27
tree0fd240121f42e1d2a6353a3c33f47c549681c3fb
parent1c3f38b30c1db0aef5ccbf6d20fb5fd13785d482
openmp: Scale type precision of collapsed iterator variable

This sets the type precision of the collapsed iterator variable to the
sum of the precision of the collapsed loop variables, up to a maximum of
sizeof(long long) (i.e. 64-bits).

2021-03-01  Kwok Cheung Yeung  <kcy@codesourcery.com>

gcc/
* omp-expand.c (expand_oacc_for): Convert .tile variable to
diff_type before multiplying.
* omp-general.c (omp_extract_for_data): Use accumulated precision
of all collapsed for-loops as precision of iteration variable, up
to the precision of a long long.

libgomp/
* testsuite/libgomp.c-c++-common/collapse-4.c: New.
* testsuite/libgomp.fortran/collapse5.f90: New.
gcc/ChangeLog.omp
gcc/omp-expand.c
gcc/omp-general.c
libgomp/ChangeLog.omp
libgomp/testsuite/libgomp.c-c++-common/collapse-4.c [new file with mode: 0644]
libgomp/testsuite/libgomp.fortran/collapse5.f90 [new file with mode: 0644]