diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-26 20:38:10 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-26 20:38:10 +0000 |
commit | 33ee4d7296548b42e4b2d5a8bbcb12a02960d300 (patch) | |
tree | 697c5fd4bd088240771a52a5b6bab0b09daef6b6 /gcc/omp-low.c | |
parent | ac0fe2adf495adf6f625546a3c0bf264bdde8ca1 (diff) | |
download | gcc-33ee4d7296548b42e4b2d5a8bbcb12a02960d300.tar.gz |
PR middle-end/59152
* omp-low.c (expand_omp_for_static_chunk): Don't set loop->latch
for the inner loop if collapse_bb is non-NULL.
(expand_omp_simd): Use cont_bb rather than e->dest as latch.
* c-c++-common/gomp/pr59152.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205410 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index df9cd25b401..7abe4567711 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -6491,7 +6491,8 @@ expand_omp_for_static_chunk (struct omp_region *region, { struct loop *loop = alloc_loop (); loop->header = body_bb; - loop->latch = cont_bb; + if (collapse_bb == NULL) + loop->latch = cont_bb; add_loop (loop, trip_loop); } } @@ -6771,7 +6772,7 @@ expand_omp_simd (struct omp_region *region, struct omp_for_data *fd) { struct loop *loop = alloc_loop (); loop->header = l1_bb; - loop->latch = e->dest; + loop->latch = cont_bb; add_loop (loop, l1_bb->loop_father); if (safelen == NULL_TREE) loop->safelen = INT_MAX; |