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

            Bug ID: 91511
           Summary: documentation of the effect of #pragma omp simd
           Product: gcc
           Version: 9.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fx at gnu dot org
  Target Milestone: ---

The behaviour of the "omp simd" pragma may be unexpected, and it would be
useful if it could be spelt out somewhere in the docs.

Experimentally, using the pragma with -march=haswell generates avx2, but avoids
fma.  Thus is loses a factor of two on some loops versus auto-vectorization's
avx2+fma.  (I was experimenting with the BLIS library's generic C kernels for
GEMM. The maintainers use the pragma because they claim GCC won't vectorize
such loops, though it does for me with any GCC version which supports the
pragma.)

I'm not saying that's wrong -- it does say "simd" after all! -- but I think
most people would be surprised by the code generation.

Reply via email to