Commit 3e836a31 by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

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
parent 2449e8e5
2008-02-01 Hans-Peter Nilsson <hp@axis.com>
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.
2008-02-01 Roger Sayle <roger@eyesopen.com> 2008-02-01 Roger Sayle <roger@eyesopen.com>
PR bootstrap/33781 PR bootstrap/33781
......
...@@ -729,9 +729,12 @@ try_fwprop_subst (struct df_ref *use, rtx *loc, rtx new, rtx def_insn, bool set_ ...@@ -729,9 +729,12 @@ try_fwprop_subst (struct df_ref *use, rtx *loc, rtx new, rtx def_insn, bool set_
{ {
cancel_changes (0); cancel_changes (0);
/* Can also record a simplified value in a REG_EQUAL note, making a /* Can also record a simplified value in a REG_EQUAL note,
new one if one does not already exist. */ making a new one if one does not already exist.
if (set_reg_equal) 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) if (dump_file)
fprintf (dump_file, " Setting REG_EQUAL note\n"); fprintf (dump_file, " Setting REG_EQUAL note\n");
......
...@@ -52,7 +52,9 @@ REG_NOTE (EQUIV) ...@@ -52,7 +52,9 @@ REG_NOTE (EQUIV)
/* Like REG_EQUIV except that the destination is only momentarily /* Like REG_EQUIV except that the destination is only momentarily
equal to the specified rtx. Therefore, it cannot be used for equal to the specified rtx. Therefore, it cannot be used for
substitution; but it can be used for cse. */ substitution; but it can be used for cse. Together with a
REG_RETVAL note, it means that the insn sets the full contents of
the libcall value. */
REG_NOTE (EQUAL) REG_NOTE (EQUAL)
/* This insn copies the return-value of a library call out of the hard /* This insn copies the return-value of a library call out of the hard
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment