aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2014-10-09 08:36:08 +0200
committerUros Bizjak <uros@gcc.gnu.org>2014-10-09 08:36:08 +0200
commit58a41b43b5f02c67544569c508424efa4115ad9f (patch)
tree8d7714ba1da9723e50658b6346ccd9c795c01dea
parentc4d91f2eacf4676d3231e687165a7a35e15b2a17 (diff)
downloadgcc-58a41b43b5f02c67544569c508424efa4115ad9f.zip
gcc-58a41b43b5f02c67544569c508424efa4115ad9f.tar.gz
gcc-58a41b43b5f02c67544569c508424efa4115ad9f.tar.bz2
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, also check CALL_INSN_FUNCTION_USAGE for clobbers again after killing regs_invalidated_by_call. From-SVN: r216026
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/regcprop.c12
2 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7884a8a..85bc361 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2014-10-09 Uros Bizjak <ubizjak@gmail.com>
+
+ 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.
+
2014-10-08 Teresa Johnson <tejohnson@google.com>
PR bootstrap/63432.
diff --git a/gcc/regcprop.c b/gcc/regcprop.c
index 3297721..01135de 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. */