summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-manip.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-12-14 15:11:16 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2010-12-14 15:11:16 +0100
commitf5b77e7d992ab6739b6eb4e640c1d85206a3ad51 (patch)
treea9eee763cc2f55324f67532790cdfafc9d211fdf /gcc/tree-ssa-loop-manip.c
parent8236c8eb4f599f95d76aafcdc11720edbce407cf (diff)
downloadgcc-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.c5
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);