[Bug other/92366] new test case gcc.dg/vect/bb-slp-41.c fails with its introduction in r277784

2019-11-20 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92366

rsandifo at gcc dot gnu.org  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from rsandifo at gcc dot gnu.org  
---
Should be fixed now, please reopen if not.

[Bug other/92366] new test case gcc.dg/vect/bb-slp-41.c fails with its introduction in r277784

2019-11-20 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92366

--- Comment #7 from rsandifo at gcc dot gnu.org  
---
Author: rsandifo
Date: Wed Nov 20 21:13:05 2019
New Revision: 278532

URL: https://gcc.gnu.org/viewcvs?rev=278532=gcc=rev
Log:
Restrict bb-slp-40.c to targets with VnQI addition (PR 92366)

bb-slp-40.c fails on SPARC targets without VIS4 because it
requires addition on vectors of bytes.  There doesn't seem to be
an existing target selector for this, so I added vect_char_add.
(Wasn't sure whether to use vect_char_add, for consistency
with vect_no_int_add/vect_int_mult etc., or vect_add_char for
consistency with vect_shift_char etc.)

I took the target list from vect_int and removed targets that didn't
seem to support the operation (namely sparc*, since we don't seem to
have any test for VIS4, niagara7 or m8, and alpha*-*-*.)

2019-11-20  Richard Sandiford  

gcc/
PR testsuite/92366
* doc/sourcebuild.texi (vect_char_add): Document.

gcc/testsuite/
PR testsuite/92366
* lib/target-supports.exp (check_effective_target_vect_char_add):
New proc.
* gcc.dg/vect/bb-slp-40.c: Require vect_char_add instead of vect_int.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/sourcebuild.texi
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/vect/bb-slp-40.c
trunk/gcc/testsuite/lib/target-supports.exp

[Bug other/92366] new test case gcc.dg/vect/bb-slp-41.c fails with its introduction in r277784

2019-11-18 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92366

Rainer Orth  changed:

   What|Removed |Added

 CC||ro at gcc dot gnu.org

--- Comment #6 from Rainer Orth  ---
Created attachment 47289
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47289=edit
32-bit sparc-sun-solaris2.11 bb-slp-40.c.162t.slp1

Even after Richard's patch, the bb-slp-40.c failure remains on SPARC (32 and
64-bit):

FAIL: gcc.dg/vect/bb-slp-40.c -flto -ffat-lto-objects  scan-tree-dump slp1
"vectorizing stmts using SLP"
FAIL: gcc.dg/vect/bb-slp-40.c scan-tree-dump slp1 "vectorizing stmts using SLP"

Dump attached.

[Bug other/92366] new test case gcc.dg/vect/bb-slp-41.c fails with its introduction in r277784

2019-11-14 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92366

--- Comment #5 from rsandifo at gcc dot gnu.org  
---
Author: rsandifo
Date: Thu Nov 14 19:24:21 2019
New Revision: 278262

URL: https://gcc.gnu.org/viewcvs?rev=278262=gcc=rev
Log:
Tweak gcc.dg/vect/bb-slp-4[01].c (PR92366)

gcc.dg/vect/bb-slp-40.c was failing on some targets because the
explicit dg-options overrode things like -maltivec.  This patch
uses dg-additional-options instead.

Also, it seems safer not to require exactly 1 instance of each message,
since that depends on the target vector length.

gcc.dg/vect/bb-slp-41.c contained invariant constructors that are
vectorised on AArch64 (foo) and constructors that aren't (bar).
This meant that the number of times we print "Found vectorizable
constructor" depended on how many vector sizes we try, since we'd
print it for each failed attempt.

In foo, we create invariant { b[0], ... } and { b[1], ... },
and the test is making sure that the two separate invariant vectors
can be fed from the same vector load at b.  This is a different case
from bb-slp-40.c, where the constructors are naturally separate.
(The expected count is 4 rather than 2 because we can vectorise the
epilogue too.)

However, due to limitations in the loop vectoriser, we still do the
addition of { b[0], ... } and { b[1], ... } in the loop.  Hopefully
that'll be fixed at some point, so this patch adds an alternative test
that directly needs 4 separate invariant constructors.  E.g. with Joel's
SLP optimisation, the new test generates:

ldr q4, [x1]
dup v7.4s, v4.s[0]
dup v6.4s, v4.s[1]
dup v5.4s, v4.s[2]
dup v4.4s, v4.s[3]

instead of the somewhat bizarre:

ldp s6, s5, [x1, 4]
ldr s4, [x1, 12]
ld1r{v7.4s}, [x1]
dup v6.4s, v6.s[0]
dup v5.4s, v5.s[0]
dup v4.4s, v4.s[0]

The patch then disables vectorisation of the original foo in
bb-vect-slp-41.c, so that we get the same correctness testing
for bar but don't need to test for specific counts.

2019-11-14  Richard Sandiford  

gcc/testsuite/
PR testsuite/92366
* gcc.dg/vect/bb-slp-40.c: Use dg-additional-options instead
of dg-options.  Remove expected counts.
* gcc.dg/vect/bb-slp-41.c: Remove dg-options and explicit
dg-do run.  Suppress vectorization of foo.
* gcc.dg/vect/bb-slp-42.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/vect/bb-slp-42.c
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/vect/bb-slp-40.c
trunk/gcc/testsuite/gcc.dg/vect/bb-slp-41.c

[Bug other/92366] new test case gcc.dg/vect/bb-slp-41.c fails with its introduction in r277784

2019-11-14 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92366

rsandifo at gcc dot gnu.org  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||rsandifo at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |rsandifo at gcc dot 
gnu.org

--- Comment #4 from rsandifo at gcc dot gnu.org  
---
Taking this since I need to update the test for
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg02063.html

[Bug other/92366] new test case gcc.dg/vect/bb-slp-41.c fails with its introduction in r277784

2019-11-06 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92366

Segher Boessenkool  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-11-06
 Ever confirmed|0   |1

[Bug other/92366] new test case gcc.dg/vect/bb-slp-41.c fails with its introduction in r277784

2019-11-06 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92366

Segher Boessenkool  changed:

   What|Removed |Added

 CC||segher at gcc dot gnu.org

--- Comment #3 from Segher Boessenkool  ---
-40 fails in the same way, on Power7 BE.

[Bug other/92366] new test case gcc.dg/vect/bb-slp-41.c fails with its introduction in r277784

2019-11-05 Thread joel.hutton at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92366

--- Comment #2 from Joel Hutton  ---
I'm looking into this. The testcase triggered a case with a constructor with a
large number of elements (at least on aarch64).

[Bug other/92366] new test case gcc.dg/vect/bb-slp-41.c fails with its introduction in r277784

2019-11-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92366

Richard Biener  changed:

   What|Removed |Added

 CC||joel.hutton at arm dot com,
   ||rguenth at gcc dot gnu.org

--- Comment #1 from Richard Biener  ---
The testcase is odd - I'm not sure what it tests.  The found vectorizable CTORs
are all vectorizer inserted invariants.