This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Use gather loads for strided accesses
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "richard dot sandiford at linaro dot org" <richard dot sandiford at linaro dot org>, <nd at arm dot com>
- Date: Sun, 7 Jan 2018 20:57:58 +0000
- Subject: Re: Use gather loads for strided accesses
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=bestguesspass action=none header.from=arm.com;
- Nodisclaimer: True
- References: <87efowwoly.fsf@linaro.org> <5b84028c-c182-5bb7-8adb-15160570b9c8@redhat.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Wed, Dec 13, 2017 at 04:47:40PM +0000, Jeff Law wrote:
> On 11/17/2017 03:02 PM, Richard Sandiford wrote:
> > This patch tries to use gather loads for strided accesses,
> > rather than falling back to VMAT_ELEMENTWISE.
> >
> > Tested on aarch64-linux-gnu (with and without SVE), x86_64-linux-gnu
> > and powerpc64le-linux-gnu. OK to install?
> >
> > Richard
> >
> >
> > 2017-11-17 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_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.
> OK.
> jeff
The AArch64 tests are OK.
Thanks,
James