This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, rs6000] Fix vec_construct vectorization cost to be somewhat more accurate
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>, richard dot guenther at gmail dot com
- Date: Mon, 18 Jul 2016 06:56:57 -0500
- Subject: Re: [PATCH, rs6000] Fix vec_construct vectorization cost to be somewhat more accurate
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com>
On Fri, Jul 15, 2016 at 08:55:08AM -0500, Bill Schmidt wrote:
> This patch is a follow-up to Richard's patch of
> https://gcc.gnu.org/ml/gcc-patches/2016-06/msg00584.html. The cost of a
> vec_construct (initialization of an N-way vector by N scalars) is too low,
> which can cause too-aggressive vectorization in particular for N=8 or
> higher. Richard changed the default cost to N-1, which is generally
> sensible. For powerpc I am going with a slightly higher cost of N, which
> will keep us from being less conservative than the previous values when N=2.
> In any case, the purpose of this patch is simply to avoid vectorizing
> things we shouldn't when we've undercounted the cost of a vec_construct.
> Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no
> regressions (hence the vectorization decisions in the test suite have
> not changed). Is this ok for trunk?
Do you also have a testcase where it does matter? It would be good to
add that, then. Or is it fixing a regression?
I know nothing about the cost model, so someone else will have to review,
or I can just say "okay" ;-)