summaryrefslogtreecommitdiff
path: root/gcc/regcprop.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-04-25 23:49:22 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2013-04-25 23:49:22 +0200
commitc5a440040289c6063654a8b09f5d7cb25e3c8323 (patch)
tree26dfbbf3487b5b84727e8c7e9d4a478c3149e1d8 /gcc/regcprop.c
parent9c818d13d45ea00592462bdc31125bc3908f6d99 (diff)
downloadgcc-c5a440040289c6063654a8b09f5d7cb25e3c8323.tar.gz
re PR rtl-optimization/57003 (gcc breaks -O2 optimization with Wine(64) - links/info/bisect of commits included)
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. From-SVN: r198320
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. */