public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/11873] inefficient use of registers induces size and time overhead
[not found] <bug-11873-6707@http.gcc.gnu.org/bugzilla/>
@ 2007-11-09 23:51 ` rask at gcc dot gnu dot org
0 siblings, 0 replies; 5+ messages in thread
From: rask at gcc dot gnu dot org @ 2007-11-09 23:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rask at gcc dot gnu dot org 2007-11-09 23:51 -------
This has improved (-O2 -fomit-frame-pointer):
test:
movl 4(%esp), %eax # 32 *movsi_1/1 [length = 4]
movl 8(%esp), %edx # 44 *movsi_1/1 [length = 4]
orl %eax, %edx # 6 *iorsi_1/1 [length = 2]
addl $1, %eax # 35 *addsi_1/1 [length = 3]
cmpl $1, %edx # 38 *cmpsi_1_insn/1 [length = 3]
sbbl %edx, %edx # 39 x86_movsicc_0_m1 [length = 2]
notl %edx # 40 *one_cmplsi2_1 [length = 2]
andl %edx, %eax # 41 *andsi_1/1 [length = 2]
ret # 47 return_internal [length = 1]
.ident "GCC: (GNU) 4.3.0 20071102 (experimental)"
With -Os -fomit-frame-pointer we get:
test:
movl 4(%esp), %edx # 32 *movsi_1/1 [length = 4]
xorl %eax, %eax # 48 *movsi_xor [length = 2]
movl 8(%esp), %ecx # 43 *movsi_1/1 [length = 4]
orl %edx, %ecx # 7 *iorsi_3 [length = 2]
je .L3 # 8 *jcc_1 [length = 2]
leal 1(%edx), %eax # 44 *lea_1 [length = 3]
.L3:
ret # 47 return_internal [length = 1]
With -O2/-Os -fomit-frame-pointer -march=pentiumpro:
test:
movl 4(%esp), %edx # 32 *movsi_1/1 [length = 4]
xorl %eax, %eax # 46 *movsi_xor [length = 2]
leal 1(%edx), %ecx # 41 *lea_1 [length = 3]
orl 8(%esp), %edx # 36 *iorsi_3 [length = 4]
cmovne %ecx, %eax # 38 *movsicc_noc/1 [length = 3]
ret # 44 return_internal [length = 1]
I would probably code it like so:
movl 4(%esp), %eax ; 4
movl 8(%esp), %edx ; 4
orl %eax, %edx ; 2
addl $-1, %edx ; 3
adcl $0, %eax ; 3
ret ; 1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11873
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/11873] inefficient use of registers induces size and time overhead
2003-08-10 8:39 [Bug optimization/11873] New: " willy at w dot ods dot org
` (2 preceding siblings ...)
2004-11-08 23:44 ` pinskia at gcc dot gnu dot org
@ 2004-11-13 6:01 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-13 6:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-13 06:01 -------
I don't know why this was put in waiting but it should not have been.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Last reconfirmed|2004-11-03 18:17:06 |2004-11-13 06:01:18
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11873
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/11873] inefficient use of registers induces size and time overhead
2003-08-10 8:39 [Bug optimization/11873] New: " willy at w dot ods dot org
2004-06-03 4:27 ` [Bug rtl-optimization/11873] " pinskia at gcc dot gnu dot org
2004-06-03 4:29 ` pinskia at gcc dot gnu dot org
@ 2004-11-08 23:44 ` pinskia at gcc dot gnu dot org
2004-11-13 6:01 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-08 23:44 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11873
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/11873] inefficient use of registers induces size and time overhead
2003-08-10 8:39 [Bug optimization/11873] New: " willy at w dot ods dot org
2004-06-03 4:27 ` [Bug rtl-optimization/11873] " pinskia at gcc dot gnu dot org
@ 2004-06-03 4:29 ` pinskia at gcc dot gnu dot org
2004-11-08 23:44 ` pinskia at gcc dot gnu dot org
2004-11-13 6:01 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-03 4:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-03 04:29 -------
I filed 15792 to track part of this bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11873
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/11873] inefficient use of registers induces size and time overhead
2003-08-10 8:39 [Bug optimization/11873] New: " willy at w dot ods dot org
@ 2004-06-03 4:27 ` pinskia at gcc dot gnu dot org
2004-06-03 4:29 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-03 4:27 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |15792
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11873
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-11-09 23:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-11873-6707@http.gcc.gnu.org/bugzilla/>
2007-11-09 23:51 ` [Bug rtl-optimization/11873] inefficient use of registers induces size and time overhead rask at gcc dot gnu dot org
2003-08-10 8:39 [Bug optimization/11873] New: " willy at w dot ods dot org
2004-06-03 4:27 ` [Bug rtl-optimization/11873] " pinskia at gcc dot gnu dot org
2004-06-03 4:29 ` pinskia at gcc dot gnu dot org
2004-11-08 23:44 ` pinskia at gcc dot gnu dot org
2004-11-13 6:01 ` 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).