PR tree-optimization/40087
* tree-ssa-loop-niter.c (number_of_iterations_ne_max,
number_of_iterations_ne): Rename never_infinite argument.
(number_of_iterations_lt_to_ne, number_of_iterations_lt,
number_of_iterations_le): Handle pointer-type ivs when
exit_must_be_taken is false.
(number_of_iterations_cond): Do not always assume that
exit_must_be_taken if the control variable is a pointer.
* gcc.dg/tree-ssa/pr40087.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147727
138bc75d-0d04-0410-961f-
82ee72b054a4