------- Comment #11 from hjl dot tools at gmail dot com  2010-06-10 14:30 
-------
(In reply to comment #10)
> (In reply to comment #9)
> 
> > > Following patch is also needed to fix conditional splitting (it does not 
> > > fix
> > > original uncovered problem where BLOCK_FOR_INSN returns null):
> > 
> > I am not sure this is correct. The code prior to revision 160394 was
> > written in such a way to support X86_TUNE_OPT_AGU.  We may have missed
> > some cases. But it is mostly correct. I'd like to know what specific
> > cases revision 160394 tried to fix. Thanks.
> 
> The patch fixes general problem, where we simply output lea from add{si,di}
> instruction. This is not correct, since lea does not clobber flags, so we
> should split add RTX to lea RTX to model this fact. 
> 

ADD is always faster than LEA for adding a register. However
there is a special case on Atom where ADD should be avoided.
It is true that LEA doesn't touch flags and we used it instead
of ADD which touches flags. It is an optimization specific for
Atom. You can think it as a special ADD for Atom and pretend
it clobbers flags. We shouldn't model it as a real LEA since
it is used to implement a faster ADD in this special case.

Uros, I'd like to revert revision 160394 to fix bootstrap on
Atom. I will work with you to resolve issues you discovered
without affecting Atom performance.  Thanks.


-- 


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

Reply via email to