This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/63844] [4.8/4.9/5 Regression] open mp parallelization prevents vectorization
- From: "andi-gcc at firstfloor dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Nov 2014 21:49:52 +0000
- Subject: [Bug tree-optimization/63844] [4.8/4.9/5 Regression] open mp parallelization prevents vectorization
- Auto-submitted: auto-generated
- References: <bug-63844-4 at http dot gcc dot gnu dot org/bugzilla/>
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