aarch64: Revert bogus fix for PR105254
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 15 Jun 2022 10:12:51 +0000 (11:12 +0100)
committerKewen Lin <linkw@linux.ibm.com>
Thu, 23 Jun 2022 02:23:59 +0000 (21:23 -0500)
commitbb1a6d92989a50df13b1a21085c86625089c9e53
tree10c914d395b17b691ecf0be1b7465cbf1e38b474
parentb3200ac82fd5aed39293a54e0e83258bb6caa600
aarch64: Revert bogus fix for PR105254

In f2ebf2d98efe0ac2314b58cf474f44cb8ebd5244 I'd forced the
chosen unroll factor to be a factor of the VF, in order to
work around an exact_div ICE in PR105254.  This was completely
bogus -- clearly I didn't look in enough detail at why we ended
up with an unrolled VF that wasn't a multiple of the UF.

Kewen has since fixed the bug properly for PR105940, so this
patch reverts my earlier attempt.  Sorry for the stupidity.

gcc/
PR tree-optimization/105254
PR tree-optimization/105940

Revert:

* 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/
* gcc.target/aarch64/sve/cost_model_14.c: New test.

(cherry picked from commit 2636660b6f35423e0cfbf53bfad5c5fed6ae6471)
gcc/config/aarch64/aarch64.cc
gcc/testsuite/gcc.target/aarch64/sve/cost_model_14.c [new file with mode: 0644]