This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PR target/17101: question about powerpc s<cond> expanders
>>>>> Gabriel Paubert writes:
Gabriel> Wouldn't the best solution in this case be?
Gabriel> addi tmp,val,-56
Gabriel> nor tmp,tmp,val
Gabriel> srwi tmp,tmp,31
Gabriel> now when comparing two variables that is different. But when one
Gabriel> of the operands is a constant there are lots of tricks to play
Gabriel> with using the complete set of Power/PPC logical instructions on
Gabriel> the sign bit.
Straight-line, simple integer sequences are better.
>> > The number of instructions do not correspond to the cost.
>> >Compares, moving bits from condition registers, and bit extraction is
>> >slower on newer PowerPC processors.
Gabriel> I'm quite surprised that integer compares have been affected, that's a
Gabriel> frequent operation and quite critical in a lot of applications. I was
Gabriel> not aware that rlwinm (and I suppose rlwimi/cntlzw/sraw/srawi and their
Gabriel> 64 bit equivalents) are becoming slower (relative to add/subtract and
Gabriel> logical), but I suspect that this mostly affects high-end 64 bit
Gabriel> processors and not 32 bit variants for embedded systems.
I would appreciate if you would avoid hyperbole and spreading
misinformation. You can look at the scheduling description in GCC to see
that your assumptions and statements are incorrect.
David