gcc/ChangeLog:
2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
* tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
argument is checked for zero before entering loop, avoid checking again.
From-SVN: r262487
+2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
+ argument is checked for zero before entering loop, avoid checking again.
+
2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
* gimplify.h (generic_expr_could_trap_p): Set as global function.
niter->niter = iter;
niter->assumptions = boolean_true_node;
+
if (adjust)
- niter->may_be_zero = fold_build2 (EQ_EXPR, boolean_type_node, src,
+ {
+ tree may_be_zero = fold_build2 (EQ_EXPR, boolean_type_node, src,
build_zero_cst
(TREE_TYPE (src)));
+ niter->may_be_zero =
+ simplify_using_initial_conditions (loop, may_be_zero);
+ }
else
niter->may_be_zero = boolean_false_node;