aarch64: Make sure the UF divides the VF [PR105254]
In this PR, we were trying to set the unroll factor to a value higher
than the minimum VF (or more specifically, to a value that doesn't
divide the VF). I guess there are two approaches to this: let the
target pick any value it likes and make target-independent code pare
it back to something that makes sense, or require targets to supply
sensible values from the outset. This patch goes for the latter
approach.
gcc/
PR tree-optimization/105254
* config/aarch64/aarch64.cc
(aarch64_vector_costs::determine_suggested_unroll_factor): Take a
loop_vec_info as argument. Restrict the unroll factor to values
that divide the VF.
(aarch64_vector_costs::finish_cost): Update call accordingly.
gcc/testsuite/
PR tree-optimization/105254
* g++.dg/vect/pr105254.cc: New test.