diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-14 21:11:39 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-14 21:11:39 +0000 |
commit | e6909fa6d4c8cac0ed809138be299cd76c6b45af (patch) | |
tree | d0adc2d3afd0ad88987bfdfcdc295897729c0770 | |
parent | d2351d8b339aa2b0eee02825c3ed245f5b83d84d (diff) | |
download | gcc-e6909fa6d4c8cac0ed809138be299cd76c6b45af.tar.gz |
2005-07-14 Alexandre Oliva <aoliva@redhat.com>
Ulrich Weigand <uweigand@de.ibm.com>
PR target/20126
* loop.c (loop_givs_rescan): Do not ICE if unable to reduce an IV
in some insn.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102033 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/loop.c | 22 |
2 files changed, 24 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f2b2bd818f..1105727eb5a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-07-14 Alexandre Oliva <aoliva@redhat.com> + Ulrich Weigand <uweigand@de.ibm.com> + + PR target/20126 + * loop.c (loop_givs_rescan): Do not ICE if unable to reduce an IV + in some insn. + 2005-07-14 Ulrich Weigand <uweigand@de.ibm.com> * config/s390/s390.h (TARGET_TPF_PROFILING): Add default definition. diff --git a/gcc/loop.c b/gcc/loop.c index ae06307bca9..2686294bfd8 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -5514,11 +5514,23 @@ loop_givs_rescan (struct loop *loop, struct iv_class *bl, rtx *reg_map) rtx reg, seq; start_sequence (); reg = force_reg (v->mode, *v->location); - seq = get_insns (); - end_sequence (); - loop_insn_emit_before (loop, 0, v->insn, seq); - if (!validate_change_maybe_volatile (v->insn, v->location, reg)) - gcc_unreachable (); + if (validate_change_maybe_volatile (v->insn, v->location, reg)) + { + seq = get_insns (); + end_sequence (); + loop_insn_emit_before (loop, 0, v->insn, seq); + } + else + { + end_sequence (); + if (loop_dump_stream) + fprintf (loop_dump_stream, + "unable to reduce iv in insn %d\n", + INSN_UID (v->insn)); + bl->all_reduced = 0; + v->ignore = 1; + continue; + } } } else if (v->replaceable) |