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]

Re: [PATCH] Fix PR optimization/13653


> Whouldn't it be more straightforward to clear the /u flag for the giv
> when strength reduction goes ahead?

This is the revised version.  RTX_UNCHANGING_P is only accessed for MEMs in 
loop.c and unroll.c so I think clearing it for REG givs should work.

Bootstrapped/regtested on i586-redhat-linux-gnu (3.3 branch).


2004-05-26  Eric Botcazou  <ebotcazou@libertysurf.fr>

        PR optimization/13653
	* loop.c (loop_givs_rescan): When reducing a non-replaceable giv,
	clear the RTX_UNCHANGING_P flag.


-- 
Eric Botcazou
Index: loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.433.2.13
diff -u -p -r1.433.2.13 loop.c
--- loop.c	29 Jan 2004 04:42:15 -0000	1.433.2.13
+++ loop.c	26 May 2004 07:16:50 -0000
@@ -4924,6 +4924,9 @@ loop_givs_rescan (loop, bl, reg_map)
 					  gen_move_insn (v->dest_reg,
 							 v->new_reg));
 
+	  /* We must do this now because we just emitted a new set.  */
+	  RTX_UNCHANGING_P (v->dest_reg) = 0;
+
  	  /* The original insn may have a REG_EQUAL note.  This note is
  	     now incorrect and may result in invalid substitutions later.
  	     The original insn is dead, but may be part of a libcall

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