[Bug tree-optimization/63844] [4.8/4.9/5 Regression] open mp parallelization prevents vectorization
andi-gcc at firstfloor dot org
gcc-bugzilla@gcc.gnu.org
Mon Nov 17 21:49:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63844
--- Comment #4 from Andi Kleen <andi-gcc at firstfloor dot org> ---
I had a typo in the test case (remove += to make the loops identical)
#define N 10000000
int a[N], b[N], c[N];
main()
{
int i;
#pragma omp parallel num_threads(4)
for (i = 0; i < N; i++) {
a[i] = b[i] + c[i];
}
for (i = 0; i < N; i++) {
a[i] = b[i] + c[i];
}
}
The case I saw vectorized on 4.8 (opensuse 13.1 compiler), but not on 5.0, was
slightly different, auto parallelized
#define N 10000000
int a[N], b[N], c[N];
main()
{
int i;
for (i = 0; i < N; i++) {
a[i] = b[i] + c[i];
}
}
With -O3 -mtree-parallelize-loops=4
I understand this will just internally generate openmp
More information about the Gcc-bugs
mailing list