public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/60117] New: simd reduction clause suppresses simd auto-vectorization when -fopenmp is set
@ 2014-02-08 16:15 tprince at computer dot org
  2014-02-08 16:16 ` [Bug c/60117] " tprince at computer dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: tprince at computer dot org @ 2014-02-08 16:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60117

            Bug ID: 60117
           Summary: simd reduction clause suppresses simd
                    auto-vectorization when -fopenmp is set
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tprince at computer dot org

Created attachment 32082
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32082&action=edit
source code reproducer

gcc version 4.9.0 20140203
gcc -O2 -ftree-vectorize -std=c99 -march=core-avx2 -fopt-info -S -fopenmp
s314.c
This uses vmaxss instruction in the main loop body, in spite of the fairly
positive vectorization report.
-O3 makes no significant difference, so -O2 is used in practice for stability
elsewhere in gcc source code.
If the omp simd is disabled by removing -fopenmp, excellent code is produced
using vmaxps.  Performance test shows 10x speedup with max-unroll-times=2.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-10  8:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-08 16:15 [Bug c/60117] New: simd reduction clause suppresses simd auto-vectorization when -fopenmp is set tprince at computer dot org
2014-02-08 16:16 ` [Bug c/60117] " tprince at computer dot org
2014-02-08 16:17 ` tprince at computer dot org
2014-02-10  8:34 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).