This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR optimization/13653
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Joern Rennecke <joern dot rennecke at superh dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 May 2004 22:43:02 +0200
- Subject: Re: [PATCH] Fix PR optimization/13653
- References: <200405251449.i4PEnQi11178@linsvr1.uk.superh.com>
> 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