https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91965

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Alexander Monakov from comment #0)
> Do we want to handle this early on via match.pd? Perhaps also applies to
> simplifying (a +- C) << N.

What exact transformation do you want? Canonicalize the constant C to something
like C % (1 << (bitsize - N))?

(In reply to Alexander Monakov from comment #1)
> On a related thought, I wonder if we can canonicalize (x << CST) to (x *
> CST') where CST' is 1<<CST.

For unsigned only... didn't we use to canonicalize in the reverse direction,
i.e. from x*4 to x<<2?

Reply via email to