public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/63844] New: open mp parallelization prevents vectorization
@ 2014-11-13  4:20 andi-gcc at firstfloor dot org
  2014-11-13  9:16 ` [Bug tree-optimization/63844] " rguenth at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: andi-gcc at firstfloor dot org @ 2014-11-13  4:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63844

            Bug ID: 63844
           Summary: open mp parallelization prevents vectorization
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andi-gcc at firstfloor dot org

#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];
        }
}


compiled with gcc -O3 -fopenmp

The first loop gets parallelized by openmp, the second loop gets vectorized.
But why does the parallelized loop not get vectorized too?


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

end of thread, other threads:[~2015-02-24 15:09 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-13  4:20 [Bug tree-optimization/63844] New: open mp parallelization prevents vectorization andi-gcc at firstfloor dot org
2014-11-13  9:16 ` [Bug tree-optimization/63844] " rguenth at gcc dot gnu.org
2014-11-17 18:52 ` andi-gcc at firstfloor dot org
2014-11-18 10:59 ` [Bug tree-optimization/63844] [4.8/4.9/5 Regression] " rguenth at gcc dot gnu.org
2014-11-18 11:03 ` jakub at gcc dot gnu.org
2014-11-18 11:13 ` rguenth at gcc dot gnu.org
2014-11-18 11:34 ` rguenth at gcc dot gnu.org
2014-11-18 11:38 ` rguenth at gcc dot gnu.org
2014-11-18 11:43 ` jakub at gcc dot gnu.org
2014-11-18 12:09 ` rguenther at suse dot de
2014-11-18 13:42 ` andi-gcc at firstfloor dot org
2014-11-18 13:44 ` andi-gcc at firstfloor dot org
2014-11-19  9:47 ` rguenth at gcc dot gnu.org
2014-11-19  9:48 ` [Bug tree-optimization/63844] [4.8/4.9 " rguenth at gcc dot gnu.org
2014-12-10 13:17 ` rguenth at gcc dot gnu.org
2014-12-19 13:33 ` jakub at gcc dot gnu.org
2015-02-23 12:06 ` rguenth at gcc dot gnu.org
2015-02-24 15:54 ` [Bug tree-optimization/63844] [4.8 " rguenth at gcc dot gnu.org
2015-02-24 16:14 ` rguenth 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).