old_insns_match_p just tests whether two instructions are
similar enough to merge.  With call_insn_abi it makes more
sense to compare the ABIs directly.


2019-09-11  Richard Sandiford  <richard.sandif...@arm.com>

gcc/
        * cfgcleanup.c (old_insns_match_p): Compare the ABIs of calls
        instead of the call-clobbered sets.

Index: gcc/cfgcleanup.c
===================================================================
--- gcc/cfgcleanup.c    2019-09-11 19:47:24.402262786 +0100
+++ gcc/cfgcleanup.c    2019-09-11 19:47:50.610078102 +0100
@@ -1227,13 +1227,7 @@ old_insns_match_p (int mode ATTRIBUTE_UN
            }
        }
 
-      HARD_REG_SET i1_used = call_insn_abi (i1).full_reg_clobbers ();
-      HARD_REG_SET i2_used = call_insn_abi (i2).full_reg_clobbers ();
-      /* ??? This preserves traditional behavior; it might not be needed.  */
-      i1_used |= fixed_reg_set;
-      i2_used |= fixed_reg_set;
-
-      if (i1_used != i2_used)
+      if (call_insn_abi (i1) != call_insn_abi (i2))
         return dir_none;
     }
 

Reply via email to