combine.c (distribute_notes): Discard REG_LIBCALL and REG_RETVAL when deleting libcal...
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 24 Oct 2000 20:24:03 +0000 (20:24 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Tue, 24 Oct 2000 20:24:03 +0000 (20:24 +0000)
* combine.c (distribute_notes): Discard REG_LIBCALL and REG_RETVAL
when deleting libcall sequence collapsed to a single instruction.

From-SVN: r37037

gcc/ChangeLog
gcc/combine.c

index 729e8899f0f9effef0603af78c1c8355b85ccca5..66148dcedfa9d5df9eca4b6c96c296c952824ab6 100644 (file)
@@ -1,3 +1,8 @@
+2000-10-24  Alexandre Oliva  <aoliva@redhat.com>
+
+       * combine.c (distribute_notes): Discard REG_LIBCALL and REG_RETVAL
+       when deleting libcall sequence collapsed to a single instruction.
+
 2000-10-24  Andrew Haley  <aph@cygnus.co.uk>
 
        * expr.c (do_store_flag): Don't crash if either side of a
index f381c142f64f08f20afd4d83ca4f0d31888da9b4..3f90230d1e747b55930321a4fb68df6e4567eef5 100644 (file)
@@ -12239,6 +12239,10 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
              place = prev_real_insn (from_insn);
              if (tem && place)
                XEXP (tem, 0) = place;
+             /* If we're deleting the last remaining instruction of a
+                libcall sequence, don't add the notes.  */
+             else if (XEXP (note, 0) == from_insn)
+               tem = place = 0;
            }
          break;
 
@@ -12252,6 +12256,10 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
              place = next_real_insn (from_insn);
              if (tem && place)
                XEXP (tem, 0) = place;
+             /* If we're deleting the last remaining instruction of a
+                libcall sequence, don't add the notes.  */
+             else if (XEXP (note, 0) == from_insn)
+               tem = place = 0;
            }
          break;