This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch RFA] backport the fix for PR rtl-optimization/37769 to 4.3


This patch fixes PR rtl-optimization/37769 for the 4.3 branch.
It's backported from the patch for the trunk:

http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00662.html

which is already applied and it looks there are no problems.  It's
tested with bootstrap and the top level "make -k check" with no new
failures both on i686-pc-linux-gnu and powerpc-apple-darwin9.5.0.
Ok for the 4.3 branch?

Regards,
	kaz
--
2008-11-01  Kaz Kojima  <kkojima@gcc.gnu.org>

	Backport from mainline:
	2008-10-24  Kaz Kojima  <kkojima@gcc.gnu.org>

	PR rtl-optimization/37769
	* regmove.c (optimize_reg_copy_2): Update REG_INC note if needed.

--- ORIG/gcc-4_3-branch/gcc/regmove.c	2008-02-20 06:48:51.000000000 +0900
+++ LOCAL/gcc-4_3-branch/gcc/regmove.c	2008-10-25 08:12:25.000000000 +0900
@@ -686,7 +686,16 @@ optimize_reg_copy_2 (rtx insn, rtx dest,
 	      {
 		if (reg_mentioned_p (dest, PATTERN (q)))
 		  {
+		    rtx note;
+
 		    PATTERN (q) = replace_rtx (PATTERN (q), dest, src);
+		    note = FIND_REG_INC_NOTE (q, dest);
+		    if (note)
+		      {
+			remove_note (q, note);
+			REG_NOTES (q)
+			  = gen_rtx_EXPR_LIST (REG_INC, src, REG_NOTES (q));
+		      }
 		    df_insn_rescan (q);
 		  }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]