diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-04-25 23:49:22 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2013-04-25 23:49:22 +0200 |
commit | c5a440040289c6063654a8b09f5d7cb25e3c8323 (patch) | |
tree | 26dfbbf3487b5b84727e8c7e9d4a478c3149e1d8 /gcc/regcprop.c | |
parent | 9c818d13d45ea00592462bdc31125bc3908f6d99 (diff) | |
download | gcc-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.c | 7 |
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. */ |