On 6/1/19 2:41 AM, Marc Glisse wrote:
> Hello,
>
> this is a small short-cut in the common case where the step is 1. This
> avoids having ldist generate a BIT_AND_EXPR that requires VRP to remove,
> then forwprop to clean up, etc, very close to the end of the
> optimization pipeline. Please do check that the test s==1 is the right one.
>
> An alternative would be to add a match.pd transformation
>
> (simplify
> (bit_and (exact_div@3 @0 INTEGER_CST@1) INTEGER_CST@2)
> (if (...)
> @3))
>
> but that duplicates VRP functionality, so I don't like it much, I'd
> rather compute the range of new SSA_NAMEs when we create them.
>
> Bootstrap+regtest on x86_64-pc-linux-gnu.
>
> 2019-06-03 Marc Glisse <marc.gli...@inria.fr>
>
> * tree-ssa-loop-niter.c (number_of_iterations_ne): Skip
> computations when step is 1.
>
OK
jeff