]> gcc.gnu.org Git - gcc.git/commit
Add emulated scatter capability to the vectorizer
authorRichard Biener <rguenther@suse.de>
Wed, 18 Jan 2023 09:59:52 +0000 (10:59 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 28 Apr 2023 12:40:48 +0000 (14:40 +0200)
commit6d4b59a9356ac4df7f4ae370495dc3366d0daa55
treec4704cd661b920b5ce1b21e02287fd661b5eea36
parent24905a4bd1375ccd99c02510b9f9529015a48315
Add emulated scatter capability to the vectorizer

This adds a scatter vectorization capability to the vectorizer
without target support by decomposing the offset and data vectors
and then performing scalar stores in the order of vector lanes.
This is aimed at cases where vectorizing the rest of the loop
offsets the cost of vectorizing the scatter.

The offset load is still vectorized and costed as such, but like
with emulated gather those will be turned back to scalar loads
by forwrpop.

* tree-vect-data-refs.cc (vect_analyze_data_refs): Always
consider scatters.
* tree-vect-stmts.cc (vect_model_store_cost): Pass in the
gather-scatter info and cost emulated scatters accordingly.
(get_load_store_type): Support emulated scatters.
(vectorizable_store): Likewise.  Emulate them by extracting
scalar offsets and data, doing scalar stores.

* gcc.dg/vect/pr25413a.c: Un-XFAIL everywhere.
* gcc.dg/vect/vect-71.c: Likewise.
* gcc.dg/vect/tsvc/vect-tsvc-s4113.c: Likewise.
* gcc.dg/vect/tsvc/vect-tsvc-s491.c: Likewise.
* gcc.dg/vect/tsvc/vect-tsvc-vas.c: Likewise.
gcc/testsuite/gcc.dg/vect/pr25413a.c
gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s4113.c
gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s491.c
gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-vas.c
gcc/testsuite/gcc.dg/vect/vect-71.c
gcc/tree-vect-data-refs.cc
gcc/tree-vect-stmts.cc
This page took 0.073906 seconds and 6 git commands to generate.