This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/54888] GCC with -Os is faster than -O3 on some AVR code
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 22 Oct 2012 12:56:23 +0000
- Subject: [Bug target/54888] GCC with -Os is faster than -O3 on some AVR code
- Auto-submitted: auto-generated
- References: <bug-54888-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54888
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-22 12:56:23 UTC ---
(In reply to comment #3)
> (In reply to comment #2)
>
> > And I actually don't understand teh issue: Optimizing for size does not require
> > to produce slow code. The code may run fast.
>
> -O3 is supposed to produce the fastest possible code, but it doesn't. -Os is
> faster. At the very least the two should be equal.
Supposed to? Where in the documentation is that specified? I remember
a sentence that -O3 enables optimization that might not always be
profitable (but that sentence seems to be gone from latest docs).
> In other words -O3 is broken.
It's behavior is certainly undesirable, but broken? For certain targets
-Os might be a win because that's what it is tuned for or icache behavior
is simply more important than anything else.