This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/63844] [4.8/4.9/5 Regression] open mp parallelization prevents vectorization


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]