gcc/libgomp
Jakub Jelinek 91c771ec8a openmp - Fix up && and || reductions [PR94366]
As the testcase shows, the special treatment of && and || reduction combiners
where we expand them as omp_out = (omp_out != 0) && (omp_in != 0) (or with ||)
is not needed just for &&/|| on floating point or complex types, but for all
&&/|| reductions - when expanded as omp_out = omp_out && omp_in (not in C but
GENERIC) it is actually gimplified into NOP_EXPRs to bool from both operands,
which turns non-zero values multiple of 2 into 0 rather than 1.

This patch just treats all &&/|| the same and furthermore uses bool type
instead of int for the comparisons.

2021-07-01  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/94366
gcc/
	* omp-low.c (lower_rec_input_clauses): Rename is_fp_and_or to
	is_truth_op, set it for TRUTH_*IF_EXPR regardless of new_var's type,
	use boolean_type_node instead of integer_type_node as NE_EXPR type.
	(lower_reduction_clauses): Likewise.
libgomp/
	* testsuite/libgomp.c-c++-common/pr94366.c: New test.
2021-07-01 08:55:49 +02:00
..
config openmp: Fix up handling of target constructs in offloaded routines [PR100573] 2021-05-26 11:28:42 +02:00
plugin [GCN] Fix run-time variable 'num_workers' 2021-06-08 12:00:15 +02:00
testsuite openmp - Fix up && and || reductions [PR94366] 2021-07-01 08:55:49 +02:00
.gitattributes
acc_prof.h
acinclude.m4
aclocal.m4
affinity-fmt.c
affinity.c
alloc.c
allocator.c
atomic.c
barrier.c
ChangeLog Daily bump. 2021-06-30 00:16:52 +00:00
ChangeLog.graphite
config.h.in offload-defaulted: Config option to silently ignore uninstalled offload compilers 2021-04-28 18:46:47 +02:00
configure offload-defaulted: Config option to silently ignore uninstalled offload compilers 2021-04-28 18:46:47 +02:00
configure.ac offload-defaulted: Config option to silently ignore uninstalled offload compilers 2021-04-28 18:46:47 +02:00
configure.tgt
critical.c
env.c
error.c
fortran.c
hashtab.h libgomp: Structure element mapping for OpenMP 5.0 2021-06-17 21:34:59 +08:00
icv-device.c
icv.c
iter_ull.c
iter.c
libgomp_f.h.in
libgomp_g.h OpenACC: Separate enter/exit data ABIs 2021-06-10 13:37:13 +02:00
libgomp-plugin.c
libgomp-plugin.h
libgomp.h libgomp: Structure element mapping for OpenMP 5.0 2021-06-17 21:34:59 +08:00
libgomp.map OpenACC: Separate enter/exit data ABIs 2021-06-10 13:37:13 +02:00
libgomp.spec.in
libgomp.texi
lock.c
loop_ull.c
loop.c
Makefile.am
Makefile.in offload-defaulted: Config option to silently ignore uninstalled offload compilers 2021-04-28 18:46:47 +02:00
oacc-async.c
oacc-cuda.c
oacc-host.c
oacc-init.c
oacc-int.h
oacc-mem.c libgomp: Structure element mapping for OpenMP 5.0 2021-06-17 21:34:59 +08:00
oacc-parallel.c libgomp: Structure element mapping for OpenMP 5.0 2021-06-17 21:34:59 +08:00
oacc-plugin.c
oacc-plugin.h
oacc-profiling.c
oacc-target.c
omp_lib.f90.in
omp_lib.h.in
omp.h.in
openacc_lib.h
openacc.f90
openacc.h
ordered.c
parallel.c
priority_queue.c
priority_queue.h
sections.c
secure_getenv.h
single.c
splay-tree.c
splay-tree.h
target.c libgomp: Structure element mapping for OpenMP 5.0 2021-06-17 21:34:59 +08:00
task.c openmp: Notify team barrier of pending tasks in omp_fulfill_event 2021-05-17 13:15:08 -07:00
taskloop.c openmp: Fix up taskloop reduction ICE if taskloop has no iterations [PR100471] 2021-05-11 09:07:47 +02:00
team.c libgomp: Silence false positive -Wmaybe-uninitialized warning [PR99984] 2021-04-09 10:18:47 +02:00
teams.c
work.c