On Thu, May 09, 2019 at 09:59:55AM -0600, Jeff Law wrote:
> THe main reason it's discouraged is because some targets have insns
> where the count would be truncated and others where it would not.   So
> for example normal shifts might truncate, but vector shifts might or
> (mips) or shifts might truncate but bit tests do not (x86).

And don't forget about zero_extract, on targets that are unforunate
enough to have that.

> I don't know enough about the s390 architecture to know if there's any
> corner cases.  You'd have to look at ever pattern in your machine
> description with a shift and verify that it's going to DTRT if the count
> hasn't been truncated.

Yeah.

> It would really help if you could provide testcases which show the
> suboptimal code and any analysis you've done.

I'd love to see this, too!


Segher

Reply via email to