First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 12086
Product:  
Component:  
Status: NEW
Resolution:
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Andrew Pinski <pinskia@gcc.gnu.org>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 12086 depends on: Show dependency tree
Show dependency graph
Bug 12086 blocks:

Additional Comments:





Mark bug as waiting for feedback
Mark bug as suspended




View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2007-07-01 01:22 Opened: 2003-08-28 03:00
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 From Andrew Pinski 2003-08-28 03:05 -------
*** Bug 12087 has been marked as a duplicate of this bug. ***

------- Comment #2 From Andrew Pinski 2003-08-28 03:21 -------
I have got my own bug.
Add the attribute may_alias to the (const unsigned int *) when creating the type will make sure 
there is no aliasing problems.
The 2 (short case) instead of 4 should be able to be done the same way and also the 8 case (long 
long).  I have to check on the size of the types but that is the only thing different than the 1 size 
case that is already there besides the extra attribute, I should be able to do this tonight.

------- Comment #3 From Andrew Pinski 2003-08-28 17:02 -------
Posted patch <http://gcc.gnu.org/ml/gcc-patches/2003-08/msg01826.html>.

------- Comment #4 From Andrew Pinski 2003-09-18 23:50 -------
Cannot be done as there are cases where it would return the wrong result.

------- Comment #5 From Falk Hueffner 2003-09-23 08:46 -------
Why do you think it would give wrong results? On big endian, it should work
IMHO,
on little endian, you might also be able to do something on some platforms (see
http://gcc.gnu.org/ml/gcc-patches/2003-04/msg01723.html)

------- Comment #6 From Andrew Pinski 2003-09-24 04:01 -------
Reopening based on new thoughts but this will not go in for 3.4 at least by me
because I am too 
busy.

------- Comment #7 From Andrew Pinski 2003-12-26 02:24 -------
*** Bug 3508 has been marked as a duplicate of this bug. ***

------- Comment #8 From Andrew Pinski 2005-10-22 23:59 -------
I don't have time to work on this any more.

------- Comment #9 From Andrew Pinski 2006-08-21 06:12 -------
I am going to fix up my patch for 4.3.0.

------- Comment #10 From Andrew Pinski 2007-05-28 21:07 -------
I am no longer working on this.

First Last Prev Next    No search results available      Search page      Enter new bug