public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/12086] New: memcmp(i,j,4) should use word (SI) subtraction
@ 2003-08-28  3:00 pinskia at gcc dot gnu dot org
  2003-08-28  3:05 ` [Bug optimization/12086] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-28  3:00 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12086

           Summary: memcmp(i,j,4) should use word (SI) subtraction
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Keywords: pessimizes-code
          Severity: enhancement
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org

It would be nice if memcmp is inlined for small n's
It would be nice if these two functions are the same:
int g(int *j,int *l)  {  return memcmp(j,l,4);  }
int h(int *j, int *l) {  return *j - *l;                   }
This save space (not in this function on PPC because of sibcall but it could because gcc 
does not have to spill to much more to go over the function call) and time (because no 
function overhead on targets where memcmp is not inlined like PPC).


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-05-26 11:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-28  3:00 [Bug optimization/12086] New: memcmp(i,j,4) should use word (SI) subtraction pinskia at gcc dot gnu dot org
2003-08-28  3:05 ` [Bug optimization/12086] " pinskia at gcc dot gnu dot org
2003-08-28  3:21 ` pinskia at gcc dot gnu dot org
2003-08-28 17:02 ` pinskia at gcc dot gnu dot org
2003-09-19  3:58 ` pinskia at gcc dot gnu dot org
2003-09-23 12:56 ` falk at debian dot org
2003-09-24  4:26 ` pinskia at gcc dot gnu dot org
2003-10-30 18:35 ` pinskia at gcc dot gnu dot org
2003-12-07  6:45 ` pinskia at gcc dot gnu dot org
2003-12-26  2:56 ` pinskia at gcc dot gnu dot org
2004-05-26 17:53 ` [Bug rtl-optimization/12086] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).