aboutsummaryrefslogtreecommitdiff
path: root/gcc/fwprop.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2013-02-07 08:07:04 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2013-02-07 08:07:04 +0000
commit73dd3123ffc080a6104a01a08a8234fbdc83bac5 (patch)
tree33510bb58a15436c9c5742765116481061bd5673 /gcc/fwprop.c
parente3936f47f63c128d6a667596111865f35869392f (diff)
downloadgcc-73dd3123ffc080a6104a01a08a8234fbdc83bac5.zip
gcc-73dd3123ffc080a6104a01a08a8234fbdc83bac5.tar.gz
gcc-73dd3123ffc080a6104a01a08a8234fbdc83bac5.tar.bz2
re PR rtl-optimization/56178 (Miscompilation of Ada front-end with profiled bootstrap)
PR rtl-optimization/56178 * cse.c (cse_insn): Do not create a REG_EQUAL note if the source is a SUBREG of a register. Tidy up related block of code. * fwprop.c (forward_propagate_and_simplify): Do not create a REG_EQUAL note if the source is a register or a SUBREG of a register. From-SVN: r195841
Diffstat (limited to 'gcc/fwprop.c')
-rw-r--r--gcc/fwprop.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/fwprop.c b/gcc/fwprop.c
index 6a82dea..17cc62a 100644
--- a/gcc/fwprop.c
+++ b/gcc/fwprop.c
@@ -1316,10 +1316,16 @@ forward_propagate_and_simplify (df_ref use, rtx def_insn, rtx def_set)
separately try plugging the definition in the note and simplifying.
And only install a REQ_EQUAL note when the destination is a REG
that isn't mentioned in USE_SET, as the note would be invalid
- otherwise. */
- set_reg_equal = (note == NULL_RTX && REG_P (SET_DEST (use_set))
- && ! reg_mentioned_p (SET_DEST (use_set),
- SET_SRC (use_set)));
+ otherwise. We also don't want to install a note if we are merely
+ propagating a pseudo since verifying that this pseudo isn't dead
+ is a pain; moreover such a note won't help anything. */
+ set_reg_equal = (note == NULL_RTX
+ && REG_P (SET_DEST (use_set))
+ && !REG_P (src)
+ && !(GET_CODE (src) == SUBREG
+ && REG_P (SUBREG_REG (src)))
+ && !reg_mentioned_p (SET_DEST (use_set),
+ SET_SRC (use_set)));
}
if (GET_MODE (*loc) == VOIDmode)