]> 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>
Tue, 21 Jun 2022 13:11:34 +0000 (14:11 +0100)
commitf3d77a2a8530627ebeacf2a53ef94be4d3319b3e
treece9b1404899235ad8999a5acb2462127f19ba20f
parent1f4ee53c2ea6ad4a91550d3e15f80cc7df24efa2
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.cc (expand_oacc_for): Convert .tile variable to
diff_type before multiplying.
* omp-general.cc (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.cc
gcc/omp-general.cc
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]