https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122236
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I don't see what in the OpenMP specification for OpenMP simd Construct would
allow such arbitrary reordering of the reductions, perhaps unless
order(unconstrained) clause is specified.
The compiler is allowed to execute multiple iterations using concurrently using
SIMD instructions, but that doesn't give it the power to first reduce from the
last SIMD lane and then from first etc. (or whatever other order, except from
the first to last).
At least in my reading of the spec.
Maybe also if it is a combined loop with say distribute without schedule clause
when the compiler can choose any order of iteration splitting among the teams
one could argue that it can reduce in any order.