diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2021-01-14 11:36:25 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2021-01-14 11:36:25 +0000 |
commit | e45c41988bfd655b1df7cff8fcf111dc6fb732e3 (patch) | |
tree | 85a81838fedfbd72c45587b2ca0f098b73658759 /gcc/tree-data-ref.c | |
parent | 48f8d1d48f2c7c2bc724dee979bcf56957f233cb (diff) | |
download | gcc-e45c41988bfd655b1df7cff8fcf111dc6fb732e3.zip gcc-e45c41988bfd655b1df7cff8fcf111dc6fb732e3.tar.gz gcc-e45c41988bfd655b1df7cff8fcf111dc6fb732e3.tar.bz2 |
vect: Account for unused IFN_LOAD_LANES results
At the moment, if we use only one vector of an LD4 result,
we'll treat the LD4 as having the cost of a single load.
But all 4 loads and any associated permutes take place
regardless of which results are actually used.
This patch therefore counts the cost of unused LOAD_LANES
results against the first statement in a group. An alternative
would be to multiply the ncopies of the first stmt by the group
size and treat other stmts in the group as having zero cost,
but I thought that might be more surprising when reading dumps.
gcc/
* tree-vect-stmts.c (vect_model_load_cost): Account for unused
IFN_LOAD_LANES results.
gcc/testsuite/
* gcc.target/aarch64/sve/cost_model_11.c: New test.
* gcc.target/aarch64/sve/mask_struct_load_5.c: Use
-fno-vect-cost-model.
Diffstat (limited to 'gcc/tree-data-ref.c')
0 files changed, 0 insertions, 0 deletions