This is the mail archive of the 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]

[Bug target/20126] [3.3/3.4/4.0 Regression] Inlined memcmp makes one argument null on entry

------- Additional Comments From aoliva at gcc dot gnu dot org  2005-04-16 21:48 -------
Subject: Re: [PR target/20126, RFC] loop DEST_ADDR biv replacement may fail

On Apr 15, 2005, Roger Sayle <> wrote:

> Sure.   Your patch in comment #28 of bugzilla PR20126 is OK for mainline
> to resolve Josh's bootstrap failure.  Sounds like you've already done
> the necessary testing, and I'll trust you on a suitable ChangeLog entry.

Thanks, here's what I've just checked in.

Index: gcc/ChangeLog
from  Alexandre Oliva  <>
	PR target/20126
	* loop.c (loop_givs_rescan): Handle non-replaceable (plus (reg)

Index: gcc/loop.c
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.526
diff -u -p -r1.526 loop.c
--- gcc/loop.c 10 Apr 2005 04:00:45 -0000 1.526
+++ gcc/loop.c 16 Apr 2005 21:40:02 -0000
@@ -5488,6 +5488,15 @@ loop_givs_rescan (struct loop *loop, str
 	    loop_insn_emit_before (loop, 0, v->insn,
 				   gen_move_insn (*v->location,
+	  else if (GET_CODE (*v->location) == PLUS
+		   && REG_P (XEXP (*v->location, 0))
+		   && CONSTANT_P (XEXP (*v->location, 1)))
+	    loop_insn_emit_before (loop, 0, v->insn,
+				   gen_move_insn (XEXP (*v->location, 0),
+						  gen_rtx_MINUS
+						  (GET_MODE (*v->location),
+						   v->new_reg,
+						   XEXP (*v->location, 1))));
 	      /* If it wasn't a reg, create a pseudo and use that.  */

Alexandre Oliva   
Red Hat Compiler Engineer   aoliva@{,}
Free Software Evangelist  oliva@{,}


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