aboutsummaryrefslogtreecommitdiff
path: root/gcc/fwprop.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2008-02-01 21:28:46 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2008-02-01 21:28:46 +0000
commit3e836a310dd93958129e5b917466c4f11cbabc13 (patch)
tree249cc303d527362a0580a568986dea3066f5601b /gcc/fwprop.c
parent2449e8e5cdb140871c4368606cd3405a48103319 (diff)
downloadgcc-3e836a310dd93958129e5b917466c4f11cbabc13.zip
gcc-3e836a310dd93958129e5b917466c4f11cbabc13.tar.gz
gcc-3e836a310dd93958129e5b917466c4f11cbabc13.tar.bz2
re PR rtl-optimization/34773 (miscompilation of vfprintf_r)
PR rtl-optimization/34773 * reg-notes.def (EQUAL): Mention significance of combination of REG_EQUAL and REG_RETVAL. * fwprop.c (try_fwprop_subst): Don't add REG_EQUAL to an insn that has a REG_RETVAL. From-SVN: r132053
Diffstat (limited to 'gcc/fwprop.c')
-rw-r--r--gcc/fwprop.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/fwprop.c b/gcc/fwprop.c
index 6bc9c67..1e03272 100644
--- a/gcc/fwprop.c
+++ b/gcc/fwprop.c
@@ -729,9 +729,12 @@ try_fwprop_subst (struct df_ref *use, rtx *loc, rtx new, rtx def_insn, bool set_
{
cancel_changes (0);
- /* Can also record a simplified value in a REG_EQUAL note, making a
- new one if one does not already exist. */
- if (set_reg_equal)
+ /* Can also record a simplified value in a REG_EQUAL note,
+ making a new one if one does not already exist.
+ Don't do this if the insn has a REG_RETVAL note, because the
+ combined presence means that the REG_EQUAL note refers to the
+ (full) contents of the libcall value. */
+ if (set_reg_equal && !find_reg_note (insn, REG_RETVAL, NULL_RTX))
{
if (dump_file)
fprintf (dump_file, " Setting REG_EQUAL note\n");