(movM): If REG_WAS_0, make sure the reg hasn't changed since then.
authorJames Van Artsdalen <jrv@gnu.org>
Fri, 12 Mar 1993 09:18:56 +0000 (09:18 +0000)
committerJames Van Artsdalen <jrv@gnu.org>
Fri, 12 Mar 1993 09:18:56 +0000 (09:18 +0000)
From-SVN: r3712

gcc/config/tahoe/tahoe.md
gcc/config/vax/vax.md

index 9e6b85abc70f5e13756c5d547ed4067418c8843e..bf2723431c625f2dd9936b95e1ac4e1073e681d0 100644 (file)
    rtx link;
    if (operands[1] == const1_rtx
       && (link = find_reg_note (insn, REG_WAS_0, 0))
-      && ! XEXP (link, 0)->volatil
+      && ! INSN_DELETED_P (XEXP (link, 0))
       && GET_CODE (XEXP (link, 0)) != NOTE
-      && no_labels_between_p (XEXP (link, 0), insn))
+      && no_labels_between_p (XEXP (link, 0), insn)
+      /* Make sure the reg hasn't been clobbered.  */
+      && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
     return \"incl %0\";
    if (GET_CODE (operands[1]) == SYMBOL_REF || GET_CODE (operands[1]) == CONST)
     {
  rtx link;
  if (operands[1] == const1_rtx
      && (link = find_reg_note (insn, REG_WAS_0, 0))
-     && ! XEXP (link, 0)->volatil
+     && ! INSN_DELETED_P (XEXP (link, 0))
      && GET_CODE (XEXP (link, 0)) != NOTE
-     && no_labels_between_p (XEXP (link, 0), insn))
+     && no_labels_between_p (XEXP (link, 0), insn)
+     /* Make sure the reg hasn't been clobbered.  */
+     && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
     return \"incw %0\";
   if (operands[1] == const0_rtx)
     return \"clrw %0\";
index 01b68a596262d0e8d3c2c85417357e1f586077a3..b3178c4aec9fa1617e6280653afd44d72002cc17 100644 (file)
       && ! INSN_DELETED_P (XEXP (link, 0))
       && GET_CODE (XEXP (link, 0)) != NOTE
       /* Make sure cross jumping didn't happen here.  */
-      && no_labels_between_p (XEXP (link, 0), insn))
+      && no_labels_between_p (XEXP (link, 0), insn)
+      /* Make sure the reg hasn't been clobbered.  */
+      && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
     return \"incl %0\";
   if (GET_CODE (operands[1]) == SYMBOL_REF || GET_CODE (operands[1]) == CONST)
     {
       && ! INSN_DELETED_P (XEXP (link, 0))
       && GET_CODE (XEXP (link, 0)) != NOTE
       /* Make sure cross jumping didn't happen here.  */
-      && no_labels_between_p (XEXP (link, 0), insn))
+      && no_labels_between_p (XEXP (link, 0), insn)
+      /* Make sure the reg hasn't been clobbered.  */
+      && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
     return \"incw %0\";
 
   if (GET_CODE (operands[1]) == CONST_INT)
       && ! INSN_DELETED_P (XEXP (link, 0))
       && GET_CODE (XEXP (link, 0)) != NOTE
       /* Make sure cross jumping didn't happen here.  */
-      && no_labels_between_p (XEXP (link, 0), insn))
+      && no_labels_between_p (XEXP (link, 0), insn)
+      /* Make sure the reg hasn't been clobbered.  */
+      && ! reg_set_between_p (operands[0], XEXP (link, 0), insn))
     return \"incb %0\";
 
   if (GET_CODE (operands[1]) == CONST_INT)