diff options
author | Matthew Fortune <matthew.fortune@imgtec.com> | 2014-06-04 13:10:49 +0000 |
---|---|---|
committer | Andrew Bennett <abennett@gcc.gnu.org> | 2014-06-04 13:10:49 +0000 |
commit | 9ccac7012cd0cf5bcb7525d67d2675f4e3e3ffd4 (patch) | |
tree | 4202ec414acd12c7b0be2d71a905d901985cb660 /gcc | |
parent | 35987ae95da833242def2e32fcc24100c20ef4b5 (diff) | |
download | gcc-9ccac7012cd0cf5bcb7525d67d2675f4e3e3ffd4.zip gcc-9ccac7012cd0cf5bcb7525d67d2675f4e3e3ffd4.tar.gz gcc-9ccac7012cd0cf5bcb7525d67d2675f4e3e3ffd4.tar.bz2 |
regcprop.c (copyprop_hardreg_forward_1): Account for HARD_REGNO_CALL_PART_CLOBBERED.
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/regcprop.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 71bad63..e3b375a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/regcprop.c b/gcc/regcprop.c index 7a5a4f6..25a20ec 100644 --- a/gcc/regcprop.c +++ b/gcc/regcprop.c @@ -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 |