openmp: Add OpenMP _BitInt support [PR113409]
commitc8f10456795c84bdbf45b1612321eb1f9b3c1415
authorJakub Jelinek <jakub@redhat.com>
Wed, 17 Jan 2024 09:47:31 +0000 (17 10:47 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 17 Jan 2024 09:47:31 +0000 (17 10:47 +0100)
tree62239a5ffa168125ecfebb9a36eab42ed301e870
parent557dbbac8e6a344d44fedff75e16008fa8a5ffb7
openmp: Add OpenMP _BitInt support [PR113409]

The following patch adds support for _BitInt iterators of OpenMP canonical
loops (with the preexisting limitation that when not using compile time
static scheduling the iterators in the library are at most unsigned long long
or signed long, so one can't in the runtime/dynamic/guided etc. cases iterate
more than what those types can represent, like is the case of e.g. __int128
iterators too) and the testcase also covers linear/reduction clauses for them.

2024-01-17  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/113409
* omp-general.cc (omp_adjust_for_condition): Handle BITINT_TYPE like
INTEGER_TYPE.
(omp_extract_for_data): Use build_bitint_type rather than
build_nonstandard_integer_type if either iter_type or loop->v type
is BITINT_TYPE.
* omp-expand.cc (expand_omp_for_generic,
expand_omp_taskloop_for_outer, expand_omp_taskloop_for_inner): Handle
BITINT_TYPE like INTEGER_TYPE.

* testsuite/libgomp.c/bitint-1.c: New test.
gcc/omp-expand.cc
gcc/omp-general.cc
libgomp/testsuite/libgomp.c/bitint-1.c [new file with mode: 0644]