emit-rtl.c (gen_sequence): Only return the pattern of an insn if its code is INSN...
authorAndrew Haley <aph@cygnus.com>
Mon, 22 Nov 1999 14:53:20 +0000 (14:53 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Mon, 22 Nov 1999 14:53:20 +0000 (14:53 +0000)
Fri Nov 12 14:08:40 1999  Andrew Haley  <aph@cygnus.com>

* emit-rtl.c (gen_sequence): Only return the pattern of an insn if
its code is INSN and it has no notes.

From-SVN: r30612

gcc/ChangeLog
gcc/emit-rtl.c

index 6cec51c1c289490adf7be3c8a21f920cd35871a1..abec23f5f6c507ed2cf48be1963491763ef72d8e 100644 (file)
@@ -1,3 +1,8 @@
+Fri Nov 12 14:08:40 1999  Andrew Haley  <aph@cygnus.com>
+
+       * emit-rtl.c (gen_sequence): Only return the pattern of an insn if
+       its code is INSN and it has no notes.
+
 1999-11-22  Andrew Haley  <aph@cygnus.com>
 
         * varasm.c (function_defined): Remove.
index 16fe0bc2c8b5b62868b3463e9e88f501ab391d2b..3b485d06f4862a35e685604294504640cff51605 100644 (file)
@@ -3393,16 +3393,16 @@ gen_sequence ()
   for (tem = first_insn; tem; tem = NEXT_INSN (tem))
     len++;
 
-  /* If only one insn, return its pattern rather than a SEQUENCE.
+  /* If only one insn, return it rather than a SEQUENCE.
      (Now that we cache SEQUENCE expressions, it isn't worth special-casing
-     the case of an empty list.)  */
+     the case of an empty list.)     
+     We only return the pattern of an insn if its code is INSN and it
+     has no notes.  This ensures that no information gets lost.  */
   if (len == 1
       && ! RTX_FRAME_RELATED_P (first_insn)
-      && (GET_CODE (first_insn) == INSN
-         || GET_CODE (first_insn) == JUMP_INSN
-         /* Don't discard the call usage field.  */
-         || (GET_CODE (first_insn) == CALL_INSN
-             && CALL_INSN_FUNCTION_USAGE (first_insn) == NULL_RTX)))
+      && GET_CODE (first_insn) == INSN
+      /* Don't throw away any reg notes. */
+      && REG_NOTES (first_insn) == 0)
     {
       if (!ggc_p)
        {