This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/84234] #pragma omp declare simd is ignored on forward declaration


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84234

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The forward declaration is not ignored, but you either need to use #pragma omp
simd on the loop you want to vectorize, or tell the compiler your function
doesn't have any side-effects that would prevent auto-vectorization.
By using #pragma omp simd, you guarantee it yourself in the caller, by using
e.g. const attribute on the function.
The restrictions on #pragma omp declare simd marked functions only talk about
SIMD regions which you aren't using, so I don't see how we can derive anything
from it for other regions.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]