postreload.c (reload_cse_move2add): Allow any condjump...
authorRichard Earnshaw <rearnsha@arm.com>
Fri, 20 Aug 2004 09:59:34 +0000 (09:59 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Fri, 20 Aug 2004 09:59:34 +0000 (09:59 +0000)
* postreload.c (reload_cse_move2add): Allow any condjump, but check
that the implicit set isn't clobbered in the jump insn.

From-SVN: r86308

gcc/ChangeLog
gcc/postreload.c

index 5b4668eac3a9f0be99bc326f696ee8f72c12e1b9..cbdecb6bcc9ae82b4565c122ac39e6bac8d03b18 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-20  Richard Earnshaw  <rearnsha@arm.com>
+
+       * postreload.c (reload_cse_move2add): Allow any condjump, but check
+       that the implicit set isn't clobbered in the jump insn.
+
 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
 
        * defaults.h (TARGET_LIBGCC_LIBFUNCS): Remove.
index 3b15118f3294c6d43ccbfe9d2c81f17c37ff7519..20d4a4f543e2b320b354b5af83209fd40ab05eb4 100644 (file)
@@ -1375,13 +1375,14 @@ reload_cse_move2add (rtx first)
 
       /* If INSN is a conditional branch, we try to extract an
         implicit set out of it.  */
-      if (any_condjump_p (insn) && onlyjump_p (insn))
+      if (any_condjump_p (insn))
        {
          rtx cnd = fis_get_condition (insn);
 
          if (cnd != NULL_RTX
              && GET_CODE (cnd) == NE
              && REG_P (XEXP (cnd, 0))
+             && !reg_set_p (XEXP (cnd, 0), insn)
              /* The following two checks, which are also in
                 move2add_note_store, are intended to reduce the
                 number of calls to gen_rtx_SET to avoid memory