regcprop.c (copyprop_hardreg_forward_1): Account for HARD_REGNO_CALL_PART_CLOBBERED.
authorMatthew Fortune <matthew.fortune@imgtec.com>
Wed, 4 Jun 2014 13:10:49 +0000 (13:10 +0000)
committerAndrew Bennett <abennett@gcc.gnu.org>
Wed, 4 Jun 2014 13:10:49 +0000 (13:10 +0000)
2014-06-04  Matthew Fortune  <matthew.fortune@imgtec.com>

gcc/
* regcprop.c (copyprop_hardreg_forward_1): Account for
HARD_REGNO_CALL_PART_CLOBBERED.

From-SVN: r211230

gcc/ChangeLog
gcc/regcprop.c

index 71bad63..e3b375a 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-04  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+       * regcprop.c (copyprop_hardreg_forward_1): Account for 
+       HARD_REGNO_CALL_PART_CLOBBERED.
+
 2014-06-04  Richard Biener  <rguenther@suse.de>
 
        * configure.ac: Check whether the underlying type of int64_t
index 7a5a4f6..25a20ec 100644 (file)
@@ -1012,7 +1012,6 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
          unsigned int set_nregs = 0;
          unsigned int regno;
          rtx exp;
-         hard_reg_set_iterator hrsi;
 
          for (exp = CALL_INSN_FUNCTION_USAGE (insn); exp; exp = XEXP (exp, 1))
            {
@@ -1031,8 +1030,10 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
                }
            }
 
-         EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call, 0, regno, hrsi)
-           if (regno < set_regno || regno >= set_regno + set_nregs)
+         for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
+           if ((TEST_HARD_REG_BIT (regs_invalidated_by_call, regno)
+                || HARD_REGNO_CALL_PART_CLOBBERED (regno, vd->e[regno].mode))
+               && (regno < set_regno || regno >= set_regno + set_nregs))
              kill_value_regno (regno, 1, vd);
 
          /* If SET was seen in CALL_INSN_FUNCTION_USAGE, and SET_SRC