public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/102861] New: [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526
@ 2021-10-20 18:19 seurer at gcc dot gnu.org
  2021-10-20 18:22 ` [Bug testsuite/102861] " aldyh at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: seurer at gcc dot gnu.org @ 2021-10-20 18:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102861

            Bug ID: 102861
           Summary: [12 regression] gcc.dg/vect/bb-slp-16.c fails after
                    r12-4526
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

g:d8edfadfc7a9795b65177a50ce44fd348858e844, r12-4526

make  -k check-gcc RUNTESTFLAGS="vect.exp=gcc.dg/vect/bb-slp-16.c"
FAIL: gcc.dg/vect/bb-slp-16.c execution test
# of expected passes            5
# of unexpected failures        1


No messages from the failure:

Running /home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/vect/vect.exp ...
FAIL: gcc.dg/vect/bb-slp-16.c execution test

                === gcc Summary ===

# of expected passes            5
# of unexpected failures        1


Hmmm.  Looks like this used to be xfailed.

commit d8edfadfc7a9795b65177a50ce44fd348858e844 (HEAD, refs/bisect/bad)
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Mon Oct 4 09:47:02 2021 +0200

    Disallow loop rotation and loop header crossing in jump threaders.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/102861] [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526
  2021-10-20 18:19 [Bug testsuite/102861] New: [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526 seurer at gcc dot gnu.org
@ 2021-10-20 18:22 ` aldyh at gcc dot gnu.org
  2021-10-20 19:41 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: aldyh at gcc dot gnu.org @ 2021-10-20 18:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102861

--- Comment #1 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Similarly to 102860.

The referenced patch reduces the amount of threaded paths, not increase them. 
This actually looks like another pass hiccuping because it was expecting a
threaded path that is no longer there.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/102861] [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526
  2021-10-20 18:19 [Bug testsuite/102861] New: [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526 seurer at gcc dot gnu.org
  2021-10-20 18:22 ` [Bug testsuite/102861] " aldyh at gcc dot gnu.org
@ 2021-10-20 19:41 ` pinskia at gcc dot gnu.org
  2021-10-21  6:28 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-20 19:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102861

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Aldy Hernandez from comment #1)
> Similarly to 102860.
> 
> The referenced patch reduces the amount of threaded paths, not increase
> them.  This actually looks like another pass hiccuping because it was
> expecting a threaded path that is no longer there.

The commit changed vect/bb-slp-16.c by a lot ...

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/102861] [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526
  2021-10-20 18:19 [Bug testsuite/102861] New: [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526 seurer at gcc dot gnu.org
  2021-10-20 18:22 ` [Bug testsuite/102861] " aldyh at gcc dot gnu.org
  2021-10-20 19:41 ` pinskia at gcc dot gnu.org
@ 2021-10-21  6:28 ` rguenth at gcc dot gnu.org
  2021-10-21  7:12 ` aldyh at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-21  6:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102861

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org
   Target Milestone|---                         |12.0

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Yeah, I think these kind of testsuite changes are no good.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/102861] [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526
  2021-10-20 18:19 [Bug testsuite/102861] New: [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526 seurer at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-10-21  6:28 ` rguenth at gcc dot gnu.org
@ 2021-10-21  7:12 ` aldyh at gcc dot gnu.org
  2021-10-21  7:50 ` rguenther at suse dot de
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: aldyh at gcc dot gnu.org @ 2021-10-21  7:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102861

--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> Yeah, I think these kind of testsuite changes are no good.

The loop threading restrictions disallow a couple jump threads (rotating the
loop and crossing the loop header without exiting the loop).  The test was
depending on these invalid threads to trigger the "optimized: basic block"
diagnostic.  Jeff suggested manually rotating the loop to continue testing the
SLP functionality.

Is there something else we could do?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/102861] [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526
  2021-10-20 18:19 [Bug testsuite/102861] New: [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526 seurer at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-10-21  7:12 ` aldyh at gcc dot gnu.org
@ 2021-10-21  7:50 ` rguenther at suse dot de
  2021-10-21  7:50 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenther at suse dot de @ 2021-10-21  7:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102861

--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 21 Oct 2021, aldyh at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102861
> 
> --- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
> (In reply to Richard Biener from comment #3)
> > Yeah, I think these kind of testsuite changes are no good.
> 
> The loop threading restrictions disallow a couple jump threads (rotating the
> loop and crossing the loop header without exiting the loop).  The test was
> depending on these invalid threads to trigger the "optimized: basic block"
> diagnostic.  Jeff suggested manually rotating the loop to continue testing the
> SLP functionality.
> 
> Is there something else we could do?

Look what exactly is missing and restore that - testcases are written
from real-world code that we expect to optimize, adjusting them to
hide the fact that we don't any longer is not good.

Even XFAIL would have been better.

That said, loop header copying is supposed to do the rotation.

Note what I see on the unchanged testcase is that we now loop vectorize
which is great (and obviously no BB vectorization opportunity remains).
So a different fix would be to simply add

/* Avoid loop vectorization.  */
/* { dg-additional-options "-fno-tree-loop-vectorize" } */

which makes the testcase PASS again (bonus for adding a variant
of the testcase that verifies we loop vectorize this).

Let me do all this for you.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/102861] [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526
  2021-10-20 18:19 [Bug testsuite/102861] New: [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526 seurer at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-10-21  7:50 ` rguenther at suse dot de
@ 2021-10-21  7:50 ` rguenth at gcc dot gnu.org
  2021-10-21  7:53 ` aldyh at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-21  7:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102861

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-10-21
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/102861] [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526
  2021-10-20 18:19 [Bug testsuite/102861] New: [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526 seurer at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-10-21  7:50 ` rguenth at gcc dot gnu.org
@ 2021-10-21  7:53 ` aldyh at gcc dot gnu.org
  2021-10-21  7:55 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: aldyh at gcc dot gnu.org @ 2021-10-21  7:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102861

--- Comment #6 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
> > Is there something else we could do?
> 
> Look what exactly is missing and restore that - testcases are written
> from real-world code that we expect to optimize, adjusting them to
> hide the fact that we don't any longer is not good.
> 
> Even XFAIL would have been better.

Heh.  That was my original suggestion, but I was vetoed :).

> 
> That said, loop header copying is supposed to do the rotation.
> 
> Note what I see on the unchanged testcase is that we now loop vectorize
> which is great (and obviously no BB vectorization opportunity remains).
> So a different fix would be to simply add
> 
> /* Avoid loop vectorization.  */
> /* { dg-additional-options "-fno-tree-loop-vectorize" } */
> 
> which makes the testcase PASS again (bonus for adding a variant
> of the testcase that verifies we loop vectorize this).
> 
> Let me do all this for you.

Thanks so much!

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/102861] [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526
  2021-10-20 18:19 [Bug testsuite/102861] New: [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526 seurer at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-10-21  7:53 ` aldyh at gcc dot gnu.org
@ 2021-10-21  7:55 ` rguenth at gcc dot gnu.org
  2021-10-21  8:03 ` cvs-commit at gcc dot gnu.org
  2021-10-21  8:03 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-21  7:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102861

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Btw,

  i = N;
  if (i > 0)
    {
      do
        {
          *pout++ = *pin++ + a;
          *pout++ = *pin++ + a;
          *pout++ = *pin++ + a;
          *pout++ = *pin++ + a;
          *pout++ = *pin++ + a;
          *pout++ = *pin++ + a;
          *pout++ = *pin++ + a;
          *pout++ = *pin++ + a;
          if (arr[i] = i)
            a = i;
          else
            a = 2;
        }
      while (i < N);

that was obviously bogus - you wanted if (N > 0) and initialize i to zero ...

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/102861] [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526
  2021-10-20 18:19 [Bug testsuite/102861] New: [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526 seurer at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2021-10-21  7:55 ` rguenth at gcc dot gnu.org
@ 2021-10-21  8:03 ` cvs-commit at gcc dot gnu.org
  2021-10-21  8:03 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-21  8:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102861

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:d438dd2523a35e073eed04d146f1e73e2514d93d

commit r12-4593-gd438dd2523a35e073eed04d146f1e73e2514d93d
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Oct 21 10:00:27 2021 +0200

    testsuite/102861 - adjust gcc.dg/vect/bb-slp-16.c change

    This reverts the bogus previous change causing runtime failures
    and instead realizes that we now have the loop condition
    if-converted and the BB vectorization opportunity realized during
    the loop vectorization pass.

    2021-10-21  Richard Biener  <rguenther@suse.de>

            PR testsuite/102861
            * gcc.dg/vect/bb-slp-16.c: Revert previous change, scan
            the vect dump instead.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/102861] [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526
  2021-10-20 18:19 [Bug testsuite/102861] New: [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526 seurer at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2021-10-21  8:03 ` cvs-commit at gcc dot gnu.org
@ 2021-10-21  8:03 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-21  8:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102861

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-10-21  8:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 18:19 [Bug testsuite/102861] New: [12 regression] gcc.dg/vect/bb-slp-16.c fails after r12-4526 seurer at gcc dot gnu.org
2021-10-20 18:22 ` [Bug testsuite/102861] " aldyh at gcc dot gnu.org
2021-10-20 19:41 ` pinskia at gcc dot gnu.org
2021-10-21  6:28 ` rguenth at gcc dot gnu.org
2021-10-21  7:12 ` aldyh at gcc dot gnu.org
2021-10-21  7:50 ` rguenther at suse dot de
2021-10-21  7:50 ` rguenth at gcc dot gnu.org
2021-10-21  7:53 ` aldyh at gcc dot gnu.org
2021-10-21  7:55 ` rguenth at gcc dot gnu.org
2021-10-21  8:03 ` cvs-commit at gcc dot gnu.org
2021-10-21  8:03 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).