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]

cselib fix

This should fix the problem Colin Howell has found.  Seems like I broke this
just two days after checking in the cselib code.  Of course we can't add the
rtx code of an expression into the hash value for REGs and MEMs; the code
absolutely depends on returning the same hash value for two rtx's with the
same value.  Now where's my brown paper bag?

Bootstrapped on i686-linux.  Will install on 3.0 branch as well after another


	* cselib.c (hash_rtx): For REG and MEM, just use value of expression
	without adding in rtx code and mode.

Index: cselib.c
RCS file: /cvs/gcc/egcs/gcc/cselib.c,v
retrieving revision 1.3
diff -u -p -r1.3 cselib.c
--- cselib.c	2001/03/09 17:03:46	1.3
+++ cselib.c	2001/03/15 12:36:30
@@ -579,8 +579,7 @@ hash_rtx (x, mode, create)
       if (! e)
 	return 0;

-      hash += e->value;
-      return hash ? hash : (unsigned int) MEM;
+      return e->value;

     case CONST_INT:
       hash += ((unsigned) CONST_INT << 7) + (unsigned) mode + INTVAL (x);

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