summaryrefslogtreecommitdiff
path: root/gcc/regcprop.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-25 21:49:22 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-25 21:49:22 +0000
commitca7195854d8b9412e3241b8e1837a9b8bf253d59 (patch)
tree26dfbbf3487b5b84727e8c7e9d4a478c3149e1d8 /gcc/regcprop.c
parent7de05b7db9eb5f85ca7fc701a2564d1a05961bc4 (diff)
downloadgcc-ca7195854d8b9412e3241b8e1837a9b8bf253d59.tar.gz
PR rtl-optimization/57003
* regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg, call note_stores with kill_clobbered_value callback again after killing regs_invalidated_by_call. * gcc.target/i386/pr57003.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198320 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regcprop.c')
-rw-r--r--gcc/regcprop.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/regcprop.c b/gcc/regcprop.c
index 97a023fc12a..896902f3012 100644
--- a/gcc/regcprop.c
+++ b/gcc/regcprop.c
@@ -1015,6 +1015,13 @@ 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)
kill_value_regno (regno, 1, vd);
+
+ /* If SET was seen in CALL_INSN_FUNCTION_USAGE, and SET_SRC
+ of the SET isn't in regs_invalidated_by_call hard reg set,
+ but instead among CLOBBERs on the CALL_INSN, we could wrongly
+ assume the value in it is still live. */
+ if (ksvd.ignore_set_reg)
+ note_stores (PATTERN (insn), kill_clobbered_value, vd);
}
/* Notice stores. */