r256641 - in /trunk/gcc: ChangeLog testsuite/Ch...

rsandifo@gcc.gnu.org rsandifo@gcc.gnu.org
Sat Jan 13 18:01:00 GMT 2018


Author: rsandifo
Date: Sat Jan 13 18:01:42 2018
New Revision: 256641

URL: https://gcc.gnu.org/viewcvs?rev=256641&root=gcc&view=rev
Log:
Use gather loads for strided accesses

This patch tries to use gather loads for strided accesses,
rather than falling back to VMAT_ELEMENTWISE.

2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

gcc/
	* tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
	optional tree argument.
	* tree-vect-data-refs.c (vect_check_gather_scatter): Check for
	null target hooks.
	(vect_create_data_ref_ptr): Take the iv_step as an optional argument,
	but continue to use the current value as a fallback.
	(bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
	to compare the updates.
	* tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
	(get_load_store_type): Use it when handling a strided access.
	(vect_get_strided_load_store_ops): New function.
	(vect_get_data_ptr_increment): Likewise.
	(vectorizable_load): Handle strided gather loads.  Always pass
	a step to vect_create_data_ref_ptr and bump_vector_ptr.

gcc/testsuite/
	* gcc.target/aarch64/sve/strided_load_1.c: New test.
	* gcc.target/aarch64/sve/strided_load_2.c: Likewise.
	* gcc.target/aarch64/sve/strided_load_3.c: Likewise.

Added:
    trunk/gcc/testsuite/gcc.target/aarch64/sve/strided_load_1.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/strided_load_2.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/strided_load_3.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-data-refs.c
    trunk/gcc/tree-vect-stmts.c
    trunk/gcc/tree-vectorizer.h



More information about the Gcc-cvs mailing list