This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix costmodel for SLP vectorization
- From: Richard Guenther <rguenther at suse dot de>
- To: Victor Kaplansky <VICTORK at il dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Ira Rosen <IRAR at il dot ibm dot com>, ubizjak at gmail dot com, rguenth at gcc dot gnu dot org
- Date: Wed, 6 Aug 2008 14:33:20 +0200 (CEST)
- Subject: Re: [PATCH] Fix costmodel for SLP vectorization
- References: <OF16865AC1.3BF6B792-ONC225749C.004FB24F-C225749C.00523B14@il.ibm.com>
On Tue, 5 Aug 2008, Victor Kaplansky wrote:
>
> Hi,
>
> Attached patch fixes a problem in SLP cost model found by Uros and
> reported in comment #5 of PR35252. The problem was that cost-model
> calculated costs of load and simple operations twice - as vectorized
> by SLP and non-SLP. Another problem fixed in this patch is that cost
> of store operation in SLP mode was counted as if it requires additional
> permute operations as it should be done for strided accesses.
> A testcase added as well.
>
> Bootstrapped and regtested on x86 and powerpc.
> OK for mainline?
Ok.
Thanks,
Richard.
>
> -- Victor
>
> ChangeLog:
>
> * tree-vect-transform.c (vect_model_simple_cost): Return
> immediately if stmt is pure SLP.
> (vect_model_store_cost): Ditto.
> (vect_model_load_cost): Ditto..
> (vectorizable_store): Remove PURE_SLP check before call
> to vect_model_store_cost.
> (vect_model_store_cost): When checking whether stmt describe
> strided access, add a check that it is not slp_node.
>
> Testsuite:
>
> * gcc.dg/vect/costmodel/ppc/costmodel-slp-34.c: New test.
>