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]
Other format: [Raw text]

RFA: Patch fixing typo in memory_move_cost for i386.


I think it is a typo (missed parentheses).  It results in different
values.  For example, load cost equal 4 for 4 bytes results in 7 and 4.
It is a pretty big difference.  Although I don't think it will improve
code.

2003-06-13  Vladimir Makarov  <vmakarov@redhat.com>

        * config/i386/i386.c (ix86_memory_move_cost): Fix typo.

Index: config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.575
diff -c -p -r1.575 i386.c
*** config/i386/i386.c	13 Jun 2003 00:45:11 -0000	1.575
--- config/i386/i386.c	13 Jun 2003 20:20:29 -0000
*************** ix86_memory_move_cost (mode, class, in)
*** 14892,14899 ****
  	if (mode == TFmode)
  	  mode = XFmode;
  	return ((in ? ix86_cost->int_load[2] : ix86_cost->int_store[2])
! 		* ((int) GET_MODE_SIZE (mode)
! 		   + UNITS_PER_WORD -1 ) / UNITS_PER_WORD);
      }
  }
  
--- 14892,14899 ----
  	if (mode == TFmode)
  	  mode = XFmode;
  	return ((in ? ix86_cost->int_load[2] : ix86_cost->int_store[2])
! 		* (((int) GET_MODE_SIZE (mode)
! 		    + UNITS_PER_WORD - 1) / UNITS_PER_WORD));
      }
  }

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