[Bug rtl-optimization/44123] gcc produces poor code at -O1

2010-05-13 Thread mattst88 at gmail dot com


--- Comment #2 from mattst88 at gmail dot com  2010-05-13 21:40 ---
(In reply to comment #1)
 What do you mean by bad?  If the code isn't correct, wrong is better
 suited; if it is suboptimal, poor is better suited.
 
 If the latter, it's expected that -O1 generates poorer code than -O2/-O3/-Os.

Yes, poor is a better word.

And by poor, I mean that gcc produces many superfluous loads and stores and
even a branch.


-- 

mattst88 at gmail dot com changed:

   What|Removed |Added

 Status|WAITING |UNCONFIRMED
Summary|gcc produces bad code at -O1|gcc produces poor code at -
   ||O1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44123



[Bug rtl-optimization/44123] gcc produces poor code at -O1

2010-05-13 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2010-05-13 21:43 ---
(In reply to comment #2)
 Yes, poor is a better word.
 
 And by poor, I mean that gcc produces many superfluous loads and stores and
 even a branch.

Yes -O1 is by design produces extra loads/stores in some cases.  


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44123



[Bug rtl-optimization/44123] gcc produces poor code at -O1

2010-05-13 Thread rth at gcc dot gnu dot org


--- Comment #4 from rth at gcc dot gnu dot org  2010-05-13 22:41 ---
The only thing wrong with the code from -O1 is that it didn't inline __ffs.
Since that function isn't explicitly marked inline, I don't see anything wrong
with that decision.

Given that adding static inline to the declaration of __ffs results in code
identical to that produced with -O2, I'm calling this not-a-bug.


-- 

rth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44123