On Sun, Aug 26, 2012 at 4:28 PM, Tom de Vries <tom_devr...@mentor.com> wrote:
> Richard,
>
> this patch fixes PR53986.
>
> The patch calculates the range of an LSHIFT_EXPR in case both operands are
> constants ranges, and the operation is guaranteed not to overflow.
>
> F.i., it evaluates [1, 2] << [1, 8] to [2, 512].
>
> Bootstrapped and reg-tested (ada inclusive) on x86_64.
>
> Ok for trunk?

Ok.

Thanks,
Richard.

> Thanks,
> - Tom
>
> 2012-08-25  Tom de Vries  <t...@codesourcery.com>
>
>         PR tree-optimization/53986
>         * tree-vrp.c (extract_range_from_multiplicative_op_1): Allow
>         LSHIFT_EXPR.
>         (extract_range_from_binary_expr_1): Handle LSHIFT with constant range 
> as
>         shift amount.
>
>         * gcc.dg/tree-ssa/vrp80.c: New test.
>         * gcc.dg/tree-ssa/vrp80-2.c: Same.

Reply via email to