The existing vector costs stop some beneficial vectorization. This is mostly
commita12d5ae9e97e26e2b60996d11c5214b036cec64c
authorwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Nov 2016 11:51:33 +0000 (14 11:51 +0000)
committerwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Nov 2016 11:51:33 +0000 (14 11:51 +0000)
tree4db5c2ad9238d945e3706325100f5638472d8299
parenta09b9a9c8f92b5711da661c2dd8ddabf66ddab0b
The existing vector costs stop some beneficial vectorization.  This is mostly
due to vector statement cost being set to 3 as well as vector loads having a
higher cost than scalar loads.  This means that even when we vectorize 4x, it
is possible that the cost of a vectorized loop is similar to the scalar
version, and we fail to vectorize.

Using a cost of 3 for a vector operation suggests they are 3 times as
expensive as scalar operations.  Since most vector operations have a
similar throughput as scalar operations, this is not correct.

Using slightly lower values for these heuristics now allows this loop
and many others to be vectorized.  On a proprietary benchmark the gain
from vectorizing this loop is around 15-30% which shows vectorizing it is
indeed beneficial.

* config/aarch64/aarch64.c (cortexa57_vector_cost):
Change vec_stmt_cost, vec_align_load_cost and vec_unalign_load_cost.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242383 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/aarch64/aarch64.c