This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR63175 - [4.9/5 regression] FAIL: gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c scan-tree-dump-times slp2" basic block vectorized using SLP" 1

On Tue, Feb 24, 2015 at 2:30 PM, Jeff Law <> wrote:
> On 02/23/15 20:38, Martin Sebor wrote:
>> On 02/22/2015 11:45 AM, David Edelsohn wrote:
>>> Does this patch really fix the problem?  The PR notes that the
>>> testcase fails and code quality has regressed.  Has the code
>>> generation been corrected but the testcase looks for the wrong string?
>>>   Presumably the message that basic block was vectorized means that the
>>> code generation is correct, but the commentary about the patch does
>>> not mention it.
>> There appear to be at least three problems at play here:
>> 1) The test expects the wrong string to determine success.
>> 2) GCC 4.9.0 and later emit suboptimal code compared to 4.8.4.
>> 3) With (1) fixed, the test fails to detect (2).
>> During my initial investigation, besides trunk, I had only looked
>> at the assembly emitted at revision 198852 since there the test
>> is reported as passing in comment #2. The code appears comparable
>> between the two.
>> Now that I've also compared the assembly emitted by 4.8.4 I see
>> what I suspect the original reporter was referring to: 4.9.0 and
>> later both uses vectorization to copy the arrays and also assigns
>> the four elements using ordinary loads and stores.  And since
>> the code has been successfully vectorized (and GCC reports it
>> in the dump) the test passes.
>> I'll need to spend some more time to find the revision that
>> caused this.
> Something to bear in mind, this may turn out to be something that isn't
> fixable at this stage in development.  So please stay in contact with your
> findings.
> Regardless, we should find a way to change the testcase so that it can
> correctly identify the missed optimization.

The fix to the testcase is fine with me.

Given that Martin's fix to the testcase allowed it to succeed without
Richi's fix for the underlying problem, is there a modification to the
testcase or a new testcase that would really test the optimization?

Thanks, David

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]