On Mon, Jul 18, 2016 at 1:56 PM, Segher Boessenkool
<seg...@kernel.crashing.org> wrote:
> Hi Bill,
>
> 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" ;-)

You can maybe look at gcc.dg/vect/slp-4[35].c (and run it with the cost model
enabled).

Richard.

>
> Segher

Reply via email to