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

--- Comment #6 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> Perhaps before we try to map MULT_EXPR into some irange/frange op the usual
> way,
> while we still have access to gimple statement check if it is MULT_EXPR with
> the same operands and use a different artificial unary op for pow2.
> We could do this for PLUS_EXPR x + x as well and handle it as 2 * x if we
> don't do that already or if match.pd doesn't already canonicalize x + x that
> way.

FYI, the range operators have a relation field, so it should be able to tell
you that both operands are equal with VREL_EQ (?).  You could use that to
optimize things.

Reply via email to