This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Inner-loop optimization regression from 3.3 to 3.4


Jan Hubicka <jh@suse.cz> writes:

> > Jan Hubicka <jh@suse.cz> writes:
> > 
> > > + 	/* Convert (a >= 0) into (~a < 0).  */
> > 
> > While we're at it, this is also a pessimization on Alpha, and probably
> > elsewhere where one has direct comparisons to registers and a zero
> > register.
> 
> The conversion is there in order to allow futher combining.  Even
> when it is not better it should work faster after it happens.  How
> much slower it is on alpha?  (in case setcc is faster then neg, we
> need a check)

a >= 0 is one insn:

cmple   zero,a0,v0

while ~a < 0 is two:

not     a0,t0
cmplt   t0,0,t0

not and cmp* have exactly the same cost on ev5 and ev6, not sure about
ev4.

-- 
	Falk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]