+2019-06-04 Marc Glisse <marc.glisse@inria.fr>
+
+ * tree-ssa-loop-niter.c (number_of_iterations_ne): Skip
+ computations when step is 1.
+
2019-06-04 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/constraints.md (define_register_constraint "wf"):
}
c = fold_build2 (EXACT_DIV_EXPR, niter_type, c, d);
- tmp = fold_build2 (MULT_EXPR, niter_type, c, inverse (s, bound));
- niter->niter = fold_build2 (BIT_AND_EXPR, niter_type, tmp, bound);
+ if (integer_onep (s))
+ {
+ niter->niter = c;
+ }
+ else
+ {
+ tmp = fold_build2 (MULT_EXPR, niter_type, c, inverse (s, bound));
+ niter->niter = fold_build2 (BIT_AND_EXPR, niter_type, tmp, bound);
+ }
return true;
}