Bug 12087 - memcmp(i,j,4) should use word (SI) subtraction
Summary: memcmp(i,j,4) should use word (SI) subtraction
Status: RESOLVED DUPLICATE of bug 12086
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.4.0
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks:
 
Reported: 2003-08-28 03:04 UTC by Andrew Pinski
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2003-08-28 03:04:44 UTC
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).
Comment 1 Andrew Pinski 2003-08-28 03:05:50 UTC
Stupid me, I press reload, opps.

*** This bug has been marked as a duplicate of 12086 ***