This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/80161] const argument hidden from AVX intrinsics due to OpenMP outlining
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Mar 2017 10:07:25 +0000
- Subject: [Bug middle-end/80161] const argument hidden from AVX intrinsics due to OpenMP outlining
- Auto-submitted: auto-generated
- References: <bug-80161-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80161
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, the last argument to these builtins has to be a constant, so e.g. at -O0
in C this will fail to compile as well, even without -fopenmp.
In C++ it of course compiles even at -O0 (with s/restrict/__restrict/g).
So, in C without -fopenmp you are relying on optimizations to propagate the
value into the intrinsics, and we don't (yet) have IPA propagation between
outlined OpenMP functions and their callers. In theory that should be doable,
but is too late for GCC 7.