re PR target/20126 (Inlined memcmp makes one argument null on entry)
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 14 Jul 2005 21:11:39 +0000 (21:11 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Thu, 14 Jul 2005 21:11:39 +0000 (21:11 +0000)
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.

Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>
From-SVN: r102033

gcc/ChangeLog
gcc/loop.c

index 2f2b2bd818fb67a930ea55ae093abbf8f24f0922..1105727eb5a7ccdb26e38348a84d72638359d216 100644 (file)
@@ -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.
index ae06307bca9c8becbe4be107893ec14acef759aa..2686294bfd8db536f64154d13017ffe466ab4b3b 100644 (file)
@@ -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)