Account for the cost of generating loop masks
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 13 Nov 2019 09:12:17 +0000 (09:12 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 13 Nov 2019 09:12:17 +0000 (09:12 +0000)
commit61e5f2df0345bcc1f7675125922692d727e20603
treed68f3d4304c78fa570671e44fcc8a57ab66db752
parent6eed64b96d886da2518d86eae5bc0a5ed66cabe0
Account for the cost of generating loop masks

We didn't take the cost of generating loop masks into account, and so
tended to underestimate the cost of loops that need multiple masks.

2019-11-13  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-loop.c (vect_estimate_min_profitable_iters): Include
the cost of generating loop masks.

gcc/testsuite/
* gcc.target/aarch64/sve/mask_struct_store_3.c: Add
-fno-vect-cost-model.
* gcc.target/aarch64/sve/mask_struct_store_3_run.c: Likewise.
* gcc.target/aarch64/sve/peel_ind_2.c: Likewise.
* gcc.target/aarch64/sve/peel_ind_2_run.c: Likewise.
* gcc.target/aarch64/sve/peel_ind_3.c: Likewise.
* gcc.target/aarch64/sve/peel_ind_3_run.c: Likewise.

From-SVN: r278125
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_3.c
gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_3_run.c
gcc/testsuite/gcc.target/aarch64/sve/peel_ind_2.c
gcc/testsuite/gcc.target/aarch64/sve/peel_ind_2_run.c
gcc/testsuite/gcc.target/aarch64/sve/peel_ind_3.c
gcc/testsuite/gcc.target/aarch64/sve/peel_ind_3_run.c
gcc/tree-vect-loop.c