public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/42226] New: [missed optimization] inefficient byte access when -Os is specified
@ 2009-11-30 8:56 carrot at google dot com
2009-11-30 8:56 ` [Bug rtl-optimization/42226] " carrot at google dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: carrot at google dot com @ 2009-11-30 8:56 UTC (permalink / raw)
To: gcc-bugs
Compile the attached test case with options -Os -mthumb, gcc generates:
add r1, r1, #40
mov r3, r0
ldrb r2, [r1]
add r3, r3, #40
strb r2, [r3]
@ sp needed for prologue
bx lr
When change the options to -O2 -mthumb, gcc generates:
mov r3, #40
ldrb r2, [r1, r3]
strb r2, [r0, r3]
@ sp needed for prologue
bx lr
It is both smaller and faster.
Compare the dumped IL with different options, all TREE expressions are
identical. The first difference occurs after rtl expanding.
--
Summary: [missed optimization] inefficient byte access when -Os
is specified
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: carrot at google dot com
GCC build triplet: i686-linux
GCC host triplet: i686-linux
GCC target triplet: arm-eabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42226
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/42226] [missed optimization] inefficient byte access when -Os is specified
2009-11-30 8:56 [Bug rtl-optimization/42226] New: [missed optimization] inefficient byte access when -Os is specified carrot at google dot com
@ 2009-11-30 8:56 ` carrot at google dot com
2009-11-30 10:34 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: carrot at google dot com @ 2009-11-30 8:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from carrot at google dot com 2009-11-30 08:56 -------
Created an attachment (id=19184)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19184&action=view)
test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42226
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/42226] [missed optimization] inefficient byte access when -Os is specified
2009-11-30 8:56 [Bug rtl-optimization/42226] New: [missed optimization] inefficient byte access when -Os is specified carrot at google dot com
2009-11-30 8:56 ` [Bug rtl-optimization/42226] " carrot at google dot com
@ 2009-11-30 10:34 ` rguenth at gcc dot gnu dot org
2009-12-09 15:49 ` ramana at gcc dot gnu dot org
2009-12-12 1:10 ` rearnsha at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-11-30 10:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2009-11-30 10:33 -------
I suspect it's rtx costs messed up if asked for speed vs. size metrics.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42226
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/42226] [missed optimization] inefficient byte access when -Os is specified
2009-11-30 8:56 [Bug rtl-optimization/42226] New: [missed optimization] inefficient byte access when -Os is specified carrot at google dot com
2009-11-30 8:56 ` [Bug rtl-optimization/42226] " carrot at google dot com
2009-11-30 10:34 ` rguenth at gcc dot gnu dot org
@ 2009-12-09 15:49 ` ramana at gcc dot gnu dot org
2009-12-12 1:10 ` rearnsha at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-12-09 15:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from ramana at gcc dot gnu dot org 2009-12-09 15:48 -------
Only with trunk - this is a performance and size regression.
The correct answer might be to define thumb1 specific size costs . At the
minute thumb1_rtx_costs is used for both speed and size.
--
ramana at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-12-09 15:48:59
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42226
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/42226] [missed optimization] inefficient byte access when -Os is specified
2009-11-30 8:56 [Bug rtl-optimization/42226] New: [missed optimization] inefficient byte access when -Os is specified carrot at google dot com
` (2 preceding siblings ...)
2009-12-09 15:49 ` ramana at gcc dot gnu dot org
@ 2009-12-12 1:10 ` rearnsha at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2009-12-12 1:10 UTC (permalink / raw)
To: gcc-bugs
--
rearnsha at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42226
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-12-12 1:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-30 8:56 [Bug rtl-optimization/42226] New: [missed optimization] inefficient byte access when -Os is specified carrot at google dot com
2009-11-30 8:56 ` [Bug rtl-optimization/42226] " carrot at google dot com
2009-11-30 10:34 ` rguenth at gcc dot gnu dot org
2009-12-09 15:49 ` ramana at gcc dot gnu dot org
2009-12-12 1:10 ` rearnsha 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).