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]

Re: Bootstrap with -O9 fails on alpha


On Aug 22, 2000, Alexandre Oliva <aoliva@redhat.com> wrote:

> Fortunately, there is (apparently) only one other call site that may
> violate the assertion, so here's a patch that fixes both of them.  Ok
> to install (if bootstrap completes)?

Bootstrap completed on alpha, but not on IA32.  We should use
mode_arg0 in fold_rtx() unless it is VOIDmode.  Here's a new patch,
that appears to be working on as many platforms as I've got access
to.  Ok to install?

Index: gcc/simplify-rtx.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/simplify-rtx.c,v
retrieving revision 1.24
diff -u -p -r1.24 simplify-rtx.c
--- gcc/simplify-rtx.c	2000/08/04 20:28:06	1.24
+++ gcc/simplify-rtx.c	2000/08/22 15:29:50
@@ -1694,7 +1694,7 @@ simplify_relational_operation (code, mod
   if (mode == VOIDmode
       && (GET_MODE (op0) != VOIDmode
 	  || GET_MODE (op1) != VOIDmode))
-    abort();
+    abort ();
 
   /* If op0 is a compare, extract the comparison arguments from it.  */
   if (GET_CODE (op0) == COMPARE && op1 == const0_rtx)
@@ -2091,7 +2091,10 @@ simplify_rtx (x)
 					 XEXP (x, 0), XEXP (x, 1), XEXP (x, 2));
 
     case '<':
-      return simplify_relational_operation (code, GET_MODE (XEXP (x, 0)),
+      return simplify_relational_operation (code,
+					    (GET_MODE (XEXP (x, 0)) != VOIDmode
+					     ? GET_MODE (XEXP (x, 0))
+					     : GET_MODE (XEXP (x, 1))),
 					    XEXP (x, 0), XEXP (x, 1));
     default:
       return NULL;
Index: gcc/cse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cse.c,v
retrieving revision 1.151
diff -u -p -r1.151 cse.c
--- gcc/cse.c	2000/08/17 23:03:43	1.151
+++ gcc/cse.c	2000/08/22 15:29:59
@@ -3858,7 +3858,19 @@ fold_rtx (x, insn)
 	    }
 	}
 
-      new = simplify_relational_operation (code, mode_arg0,
+      new = simplify_relational_operation (code,
+					   (mode_arg0 != VOIDmode
+					    ? mode_arg0
+					    : (GET_MODE (const_arg0
+							 ? const_arg0
+							 : folded_arg0)
+					       != VOIDmode)
+					    ? GET_MODE (const_arg0
+							? const_arg0
+							: folded_arg0)
+					    : GET_MODE (const_arg1
+							? const_arg1
+							: folded_arg1)),
 					   const_arg0 ? const_arg0 : folded_arg0,
 					   const_arg1 ? const_arg1 : folded_arg1);
 #ifdef FLOAT_STORE_FLAG_VALUE

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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