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
* [Bug optimization/12086] memcmp(i,j,4) should use word (SI) subtraction
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 ` pinskia at gcc dot gnu dot org
2003-08-28 3:21 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-28 3:05 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
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-28 03:05 -------
*** Bug 12087 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug optimization/12086] memcmp(i,j,4) should use word (SI) subtraction
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
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-28 3:21 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
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-08-28 03:21:10
date| |
Target Milestone|--- |3.4
------- Additional Comments From pinskia at gcc dot gnu dot org 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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug optimization/12086] memcmp(i,j,4) should use word (SI) subtraction
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
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-28 17:02 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
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-28 17:02 -------
Posted patch <http://gcc.gnu.org/ml/gcc-patches/2003-08/msg01826.html>.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug optimization/12086] memcmp(i,j,4) should use word (SI) subtraction
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
` (2 preceding siblings ...)
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
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-19 3:58 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
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |INVALID
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-18 23:50 -------
Cannot be done as there are cases where it would return the wrong result.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug optimization/12086] memcmp(i,j,4) should use word (SI) subtraction
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
` (3 preceding siblings ...)
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
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: falk at debian dot org @ 2003-09-23 12:56 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
------- Additional Comments From falk at debian dot org 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)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug optimization/12086] memcmp(i,j,4) should use word (SI) subtraction
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
` (4 preceding siblings ...)
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
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-24 4:26 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
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
Target Milestone|3.4 |---
------- Additional Comments From pinskia at gcc dot gnu dot org 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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug optimization/12086] memcmp(i,j,4) should use word (SI) subtraction
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
` (5 preceding siblings ...)
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
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-30 18:35 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
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |ASSIGNED
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug optimization/12086] memcmp(i,j,4) should use word (SI) subtraction
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
` (6 preceding siblings ...)
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
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-07 6:45 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2003-08-28 03:21:10 |2003-12-07 06:45:57
date| |
Target Milestone|--- |3.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12086
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug optimization/12086] memcmp(i,j,4) should use word (SI) subtraction
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
` (7 preceding siblings ...)
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
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-26 2:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-26 02:24 -------
*** Bug 3508 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |85535-quiet at bugs dot
| |debian dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12086
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/12086] memcmp(i,j,4) should use word (SI) subtraction
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
` (8 preceding siblings ...)
2003-12-26 2:56 ` pinskia at gcc dot gnu dot org
@ 2004-05-26 17:53 ` pinskia at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-26 17:53 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.5.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12086
^ 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).