From 30d3fc60ed43590b2f785fbc9374d2c7e16b7659 Mon Sep 17 00:00:00 2001 From: Zdenek Dvorak Date: Fri, 24 Sep 2004 16:36:28 +0200 Subject: [PATCH] re PR rtl-optimization/17625 (ICE on legal (doloop creates shared RTL)) PR rtl-optimization/17625 * loop-doloop.c (doloop_modify): Unshare rtl before emitting it. From-SVN: r88038 --- gcc/ChangeLog | 5 +++++ gcc/loop-doloop.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aac77b4166f..c01942dbb70 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-09-24 Zdenek Dvorak + + PR rtl-optimization/17625 + * loop-doloop.c (doloop_modify): Unshare rtl before emitting it. + 2004-09-24 Andrew Pinski PR tree-opt/17624 diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c index e463eeab899..7b4f4d42b5f 100644 --- a/gcc/loop-doloop.c +++ b/gcc/loop-doloop.c @@ -292,7 +292,7 @@ doloop_modify (struct loop *loop, struct niter_desc *desc, if (GET_CODE (counter_reg) == PLUS) counter_reg = XEXP (counter_reg, 0); - count = desc->niter_expr; + count = copy_rtx (desc->niter_expr); increment_count = false; switch (GET_CODE (condition)) { @@ -345,7 +345,7 @@ doloop_modify (struct loop *loop, struct niter_desc *desc, if (desc->noloop_assumptions) { - rtx ass = desc->noloop_assumptions; + rtx ass = copy_rtx (desc->noloop_assumptions); basic_block preheader = loop_preheader_edge (loop)->src; basic_block set_zero = loop_split_edge_with (loop_preheader_edge (loop), NULL_RTX); -- 2.30.2