vect: Use start value in vect_load_perm_consecutive_p [PR122797].
vect_load_perm_consecutive_p is used in a spot where we want to check
that a permutation is consecutive and starting with 0. Originally I
wanted to add this way of checking to the function but what I ended
up with is checking whether the given permutation is consecutive
starting from a certain index. Thus, we will return true for
e.g. {1, 2, 3} which doesn't make sense in the context of the PR.
This patch corrects it.
PR tree-optimization/122797
gcc/ChangeLog:
* tree-vect-slp.cc (vect_load_perm_consecutive_p): Check
permutation start at element 0 with value instead of starting
at a given element.
(vect_optimize_slp_pass::remove_redundant_permutations):
Use start value of 0.
* tree-vectorizer.h (vect_load_perm_consecutive_p): Set default
value to to UINT_MAX.