diff options
author | Richard Biener <rguenther@suse.de> | 2024-09-20 15:07:24 +0200 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2024-09-24 10:17:36 +0200 |
commit | f594008dcced0ebb86908f3d7602fcf943e05bc7 (patch) | |
tree | 82428a4cae926407a2b887064ce4455e93cc8515 /gcc/cp/parser.cc | |
parent | 618871ff09c07817f7ce9b2bd7338cd3299ad8f5 (diff) | |
download | gcc-f594008dcced0ebb86908f3d7602fcf943e05bc7.zip gcc-f594008dcced0ebb86908f3d7602fcf943e05bc7.tar.gz gcc-f594008dcced0ebb86908f3d7602fcf943e05bc7.tar.bz2 |
tree-optimization/115372 - failed store-lanes in some cases
The gcc.target/riscv/rvv/autovec/struct/struct_vect-4.c testcase shows
that we sometimes fail to use store-lanes even though it should be
profitable. We're currently relying on vect_slp_prefer_store_lanes_p
at the point we run into the first SLP discovery mismatch with obviously
limited information. For the case at hand we have 3, 5 or 7 lanes
of VnDImode [2, 2] vectors with the first mismatch at lane 2 so the
new group size is 1. The heuristic says that might be an OK split
given the rest is a multiple of the vector lanes. Now we continue
discovery but in the end mismatches result in uniformly single-lane
SLP instances which we can handle via interleaving but of course are
prime candidates for store-lanes. The following patch re-assesses
with the extra knowledge now just relying on the fact whether the
target supports store-lanes for the given group size.
PR tree-optimization/115372
* tree-vect-slp.cc (vect_build_slp_instance): Compute the
uniform, if, number of lanes of the RHS sub-graphs feeding
the store and if uniformly one, use store-lanes if the target
supports that.
Diffstat (limited to 'gcc/cp/parser.cc')
0 files changed, 0 insertions, 0 deletions