diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-12-14 15:11:16 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-12-14 15:11:16 +0100 |
commit | f5b77e7d992ab6739b6eb4e640c1d85206a3ad51 (patch) | |
tree | a9eee763cc2f55324f67532790cdfafc9d211fdf /gcc/tree-ssa-loop-manip.c | |
parent | 8236c8eb4f599f95d76aafcdc11720edbce407cf (diff) | |
download | gcc-f5b77e7d992ab6739b6eb4e640c1d85206a3ad51.tar.gz |
re PR middle-end/46885 (ICE: in gsi_insert_seq_nodes_after, at gimple-iterator.c:251 with -ftree-parallelize-loops -g)
PR debug/46885
* tree-ssa-loop-manip.c (canonicalize_loop_ivs): Use gsi_last_bb
instead of gsi_last_nondebug_bb if bump_in_latch.
* gcc.dg/autopar/pr46885.c: New test.
From-SVN: r167801
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
-rw-r--r-- | gcc/tree-ssa-loop-manip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c index 87b2c0d095d..8176ed8d04c 100644 --- a/gcc/tree-ssa-loop-manip.c +++ b/gcc/tree-ssa-loop-manip.c @@ -1221,7 +1221,10 @@ canonicalize_loop_ivs (struct loop *loop, tree *nit, bool bump_in_latch) gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts); } - gsi = gsi_last_nondebug_bb (bump_in_latch ? loop->latch : loop->header); + if (bump_in_latch) + gsi = gsi_last_bb (loop->latch); + else + gsi = gsi_last_nondebug_bb (loop->header); create_iv (build_int_cst_type (type, 0), build_int_cst (type, 1), NULL_TREE, loop, &gsi, bump_in_latch, &var_before, NULL); |