[Bug c/60117] New: simd reduction clause suppresses simd auto-vectorization when -fopenmp is set
tprince at computer dot org
gcc-bugzilla@gcc.gnu.org
Sat Feb 8 16:15:00 GMT 2014
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.
More information about the Gcc-bugs
mailing list