vect: Fix missed gather load opportunity
While writing a testcase for PR106794, I noticed that we failed
to vectorise the testcase in the patch for SVE. The code that
recognises gather loads tries to optimise the point at which
the offset is calculated, to avoid unnecessary extensions or
truncations:
/* Don't include the conversion if the target is happy with
the current offset type. */
But breaking only makes sense if we're at an SSA_NAME (which could
then be vectorised). We shouldn't break on a conversion embedded
in a generic expression.
gcc/
* tree-vect-data-refs.cc (vect_check_gather_scatter): Restrict
early-out optimisation to SSA_NAMEs.
gcc/testsuite/
* gcc.dg/vect/vect-gather-5.c: New test.