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

Re: ICE in optimized build of 20000103


On Jan  6, 2000, David Ronis <ronis@onsager.chem.mcgill.ca> wrote:

> It is a longstanding bug, albeit one that won't turn up unless you
> turn on enough optimization; the concern is, of course, that if gcc
> can't build itself with optimization turned on how can it be trusted
> to work with other code.

I've just completed a binary search and located the patch that
introduced the -O3 bootstrap failure.  I'm sorry to say it was:

Thu Sep 30 18:04:13 1999  Richard Henderson  <rth@cygnus.com>

	* jump.c (jump_optimize_1): Amend last change to test only the
	form of the operand, not the insn.

	* jump.c (jump_optimize_1) [conditional_move]: Use general_operand
	not register_operand to determine when B may need preloading.


By reverting this patch in a very recent CVS tree, I could complete a
bootstrap with BOOT_CFLAGS=-O9 on an IA32 host.  Here's the patch that
brings IA32 back to bootstrap-O3-land.  Should I install this?

Index: gcc/ChangeLog
from  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>

	* jump.c (jump_optimize_1): Revert Richard Henderson's
	1999-09-30's patch.

Index: gcc/jump.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/jump.c,v
retrieving revision 1.96
diff -u -r1.96 jump.c
--- gcc/jump.c	2000/01/04 16:29:40	1.96
+++ gcc/jump.c	2000/01/07 09:31:56
@@ -1354,11 +1354,11 @@
 
 		start_sequence ();
 
-		/* We're dealing with a single_set insn with no side effects
-		   on SET_SRC.  We do need to be reasonably certain that if
-		   we need to force BVAL into a register that we won't 
-		   clobber the flags -- general_operand should suffice.  */
-		if (general_operand (temp2, GET_MODE (var)))
+		/* If we're not dealing with a register or the insn is more
+		   complex than a simple SET, duplicate the computation and
+		   replace the destination with a new temporary.  */
+		if (register_operand (temp2, GET_MODE (var))
+		    && GET_CODE (PATTERN (temp)) == SET)
 		  bval = temp2;
 		else
 		  {

-- 
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them

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