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
ChangeLog Daily bump. 2021-06-30 00:16:52 +00:00
ChangeLog.graphite
Makefile.am openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
Makefile.in offload-defaulted: Config option to silently ignore uninstalled offload compilers 2021-04-28 18:46:47 +02:00
acc_prof.h Update copyright years. 2021-01-04 10:26:59 +01:00
acinclude.m4
aclocal.m4
affinity-fmt.c Update copyright years. 2021-01-04 10:26:59 +01:00
affinity.c Update copyright years. 2021-01-04 10:26:59 +01:00
alloc.c Update copyright years. 2021-01-04 10:26:59 +01:00
allocator.c Update copyright years. 2021-01-04 10:26:59 +01:00
atomic.c Update copyright years. 2021-01-04 10:26:59 +01:00
barrier.c Update copyright years. 2021-01-04 10:26:59 +01:00
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 libgomp: enable linux-futex on riscv64 2021-01-18 15:13:48 +01:00
critical.c Update copyright years. 2021-01-04 10:26:59 +01:00
env.c Update copyright years. 2021-01-04 10:26:59 +01:00
error.c Update copyright years. 2021-01-04 10:26:59 +01:00
fortran.c openmp: Add support for the OpenMP 5.0 task detach clause 2021-01-16 12:58:13 -08:00
hashtab.h libgomp: Structure element mapping for OpenMP 5.0 2021-06-17 21:34:59 +08:00
icv-device.c Update copyright years. 2021-01-04 10:26:59 +01:00
icv.c Update copyright years. 2021-01-04 10:26:59 +01:00
iter.c Update copyright years. 2021-01-04 10:26:59 +01:00
iter_ull.c Update copyright years. 2021-01-04 10:26:59 +01:00
libgomp-plugin.c Update copyright years. 2021-01-04 10:26:59 +01:00
libgomp-plugin.h Update copyright years. 2021-01-04 10:26:59 +01:00
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 libgomp: Add documentation for omp_fulfill_event runtime function 2021-01-25 09:58:51 -08:00
libgomp_f.h.in Update copyright years. 2021-01-04 10:26:59 +01:00
libgomp_g.h OpenACC: Separate enter/exit data ABIs 2021-06-10 13:37:13 +02:00
lock.c Update copyright years. 2021-01-04 10:26:59 +01:00
loop.c Update copyright years. 2021-01-04 10:26:59 +01:00
loop_ull.c Update copyright years. 2021-01-04 10:26:59 +01:00
oacc-async.c Update copyright years. 2021-01-04 10:26:59 +01:00
oacc-cuda.c Update copyright years. 2021-01-04 10:26:59 +01:00
oacc-host.c Update copyright years. 2021-01-04 10:26:59 +01:00
oacc-init.c Update copyright years. 2021-01-04 10:26:59 +01:00
oacc-int.h Update copyright years. 2021-01-04 10:26:59 +01:00
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 Update copyright years. 2021-01-04 10:26:59 +01:00
oacc-plugin.h Update copyright years. 2021-01-04 10:26:59 +01:00
oacc-profiling.c Update copyright years. 2021-01-04 10:26:59 +01:00
oacc-target.c
omp.h.in openmp: Add support for the OpenMP 5.0 task detach clause 2021-01-16 12:58:13 -08:00
omp_lib.f90.in openmp: Add support for the OpenMP 5.0 task detach clause 2021-01-16 12:58:13 -08:00
omp_lib.h.in openmp: Add support for the OpenMP 5.0 task detach clause 2021-01-16 12:58:13 -08:00
openacc.f90 Update copyright years. 2021-01-04 10:26:59 +01:00
openacc.h Update copyright years. 2021-01-04 10:26:59 +01:00
openacc_lib.h Update copyright years. 2021-01-04 10:26:59 +01:00
ordered.c Update copyright years. 2021-01-04 10:26:59 +01:00
parallel.c Update copyright years. 2021-01-04 10:26:59 +01:00
priority_queue.c openmp: Add support for the OpenMP 5.0 task detach clause 2021-01-16 12:58:13 -08:00
priority_queue.h openmp: Add support for the OpenMP 5.0 task detach clause 2021-01-16 12:58:13 -08:00
sections.c Update copyright years. 2021-01-04 10:26:59 +01:00
secure_getenv.h Update copyright years. 2021-01-04 10:26:59 +01:00
single.c Update copyright years. 2021-01-04 10:26:59 +01:00
splay-tree.c Update copyright years. 2021-01-04 10:26:59 +01:00
splay-tree.h Update copyright years. 2021-01-04 10:26:59 +01:00
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 Update copyright years. 2021-01-04 10:26:59 +01:00
work.c Update copyright years. 2021-01-04 10:26:59 +01:00