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]

Pessimization



	I am pretty unfamiliar with gcc internals, so please forgive
me if this patch is incorrect.  However, I think I have found a spot
in cse.c where the compiler may be deliberately choosing the worse
alternative because a comparison is reversed.  I am just infrering this
from the names of the functions and variables and some surrounding code.
Anyhow, I have attached a patch that should fix this error if it is an
error.

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 205
adam@yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."

-------------------------------------CUT HERE---------------------------
*** egcs-1.0/gcc/cse.c~	Sun Nov 16 22:50:55 1997
--- egcs-1.0/gcc/cse.c	Sun Dec  7 17:46:08 1997
***************
*** 2578,2582 ****
  	  && (ADDRESS_COST (folded) < ADDRESS_COST (addr)
  	      || (ADDRESS_COST (folded) == ADDRESS_COST (addr)
! 		  && rtx_cost (folded, MEM) > rtx_cost (addr, MEM)))
  #else
  	  && rtx_cost (folded, MEM) < rtx_cost (addr, MEM)
--- 2578,2582 ----
  	  && (ADDRESS_COST (folded) < ADDRESS_COST (addr)
  	      || (ADDRESS_COST (folded) == ADDRESS_COST (addr)
! 		  && rtx_cost (folded, MEM) < rtx_cost (addr, MEM)))
  #else
  	  && rtx_cost (folded, MEM) < rtx_cost (addr, MEM)


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