vec: don't select partial vectors when unnecessary
authorAndrea Corallo <andrea.corallo@arm.com>
Fri, 28 Aug 2020 15:01:15 +0000 (16:01 +0100)
committerAndrea Corallo <andrea.corallo@arm.com>
Wed, 16 Sep 2020 13:17:17 +0000 (15:17 +0200)
commit052204fac580b21c967e57e6285d99a9828b8fac
tree0503459bcc84856c2f71ab5cca17878aebfb34f1
parent453a20c65722719b9e2d84339f215e7ec87692dc
vec: don't select partial vectors when unnecessary

gcc/ChangeLog

2020-09-09  Andrea Corallo  <andrea.corallo@arm.com>

* tree-vect-loop.c (vect_need_peeling_or_partial_vectors_p): New
function.
(vect_analyze_loop_2): Make use of it not to select partial
vectors if no peel is required.
(determine_peel_for_niter): Move out some logic into
'vect_need_peeling_or_partial_vectors_p'.

gcc/testsuite/ChangeLog

2020-09-09  Andrea Corallo  <andrea.corallo@arm.com>

* gcc.target/aarch64/sve/cost_model_10.c: New test.
* gcc.target/aarch64/sve/clastb_8.c: Update test for new
vectorization strategy.
* gcc.target/aarch64/sve/cost_model_5.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_14.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_15.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_16.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_17.c: Likewise.
gcc/testsuite/gcc.target/aarch64/sve/clastb_8.c
gcc/testsuite/gcc.target/aarch64/sve/cost_model_10.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cost_model_5.c
gcc/testsuite/gcc.target/aarch64/sve/struct_vect_14.c
gcc/testsuite/gcc.target/aarch64/sve/struct_vect_15.c
gcc/testsuite/gcc.target/aarch64/sve/struct_vect_16.c
gcc/testsuite/gcc.target/aarch64/sve/struct_vect_17.c
gcc/tree-vect-loop.c