summaryrefslogtreecommitdiff
path: root/gcc/regcprop.c
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-09 06:36:08 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-09 06:36:08 +0000
commit1b4aaefc8c1a1662e1623cd48157c344c7fa98fe (patch)
tree8d7714ba1da9723e50658b6346ccd9c795c01dea /gcc/regcprop.c
parentf1ce4e720afde46ad6c514bf718939c9e70a46a2 (diff)
downloadgcc-1b4aaefc8c1a1662e1623cd48157c344c7fa98fe.tar.gz
PR rtl-optimization/57003
* regcprop.c (copyprop_hardreg_forward_1): If ksvd.ignore_set_reg, also check CALL_INSN_FUNCTION_USAGE for clobbers again after killing regs_invalidated_by_call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216026 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regcprop.c')
-rw-r--r--gcc/regcprop.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/regcprop.c b/gcc/regcprop.c
index 3297721df39..01135dea179 100644
--- a/gcc/regcprop.c
+++ b/gcc/regcprop.c
@@ -1029,7 +1029,17 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
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);
+ {
+ note_stores (PATTERN (insn), kill_clobbered_value, vd);
+ for (exp = CALL_INSN_FUNCTION_USAGE (insn);
+ exp;
+ exp = XEXP (exp, 1))
+ {
+ rtx x = XEXP (exp, 0);
+ if (GET_CODE (x) == CLOBBER)
+ kill_value (SET_DEST (x), vd);
+ }
+ }
}
/* Notice stores. */