[Bug tree-optimization/92177] [10/11 regression] gcc.dg/vect/bb-slp-22.c FAILs

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 4 16:08:41 GMT 2020


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |ASSIGNED

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
The SLP reorgs made making this testcase target agnostic really really hard. 
It was supposed to test multiplication vectorization but now tests nothing.  I
don't see how to reliably test this unless we scan for details in the
vectorizer
dumps that are prone to change.  Currently we have for example
on x86_64:

/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
SLPing BB part
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
------>vectorizing SLP node starting from: _5 = x_48(D) + 1;
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
vect_is_simple_use: operand x_48(D), type of def: external
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
vect_is_simple_use: operand 1, type of def: constant
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
transform binary/unary operation.
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
created new init_stmt: vect_cst__63 = _42;
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
created new init_stmt: vect_cst__12 = { 1, 1, 1, 1 };
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
add new stmt: vect__5.19_13 = vect_cst__63 + vect_cst__12;
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
------>vectorizing SLP node starting from: _6 = _5 * a0_44;
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
vect_is_simple_use: operand x_48(D) + 1, type of def: internal
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
vect_is_simple_use: vectype vector(4) unsigned int
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
vect_is_simple_use: operand _1 + 23, type of def: external
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
transform binary/unary operation.
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
created new init_stmt: vect_cst__71 = _70;
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
add new stmt: vect__6.20_72 = vect__5.19_13 * vect_cst__71;
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
------>vectorizing SLP node starting from: out[0] = _6;
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
vect_is_simple_use: operand _5 * a0_44, type of def: internal
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
vect_is_simple_use: vectype vector(4) unsigned int
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
vect_is_simple_use: operand _7 * a1_45, type of def: internal
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
vect_is_simple_use: operand _5 * a2_46, type of def: internal
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
vect_is_simple_use: operand _7 * a3_47, type of def: internal
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
transform store. ncopies = 1
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
create vector_type-pointer variable to type: vector(4) unsigned int 
vectorizing a pointer ref: out[0]
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
created &out[0]
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
add new stmt: MEM <vector(4) unsigned int> [(unsigned int *)&out] =
vect__6.20_72;
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14: note:
vectorizing stmts using SLP.
/home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/bb-slp-22.c:35:14:
optimized: basic block part vectorized using 16 byte vectors

we could match 'vectorizing SLP node starting from: _6 = _5 * a0_44;

which means we are actually vectorizing a multiplication.  Like with
the following.  Rainer - can you test this?

diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-22.c
b/gcc/testsuite/gcc.dg/vect/bb-slp-22.c
index 6dc2375f5d1..f25a225666e 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-22.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-22.c
@@ -63,6 +63,6 @@ int main (void)
   return 0;
 }

-/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2"  {
target { ! {vect_int_mult } } } } } */
-/* { dg-final { scan-tree-dump-times "basic block vectorized" 2 "slp2"  {
target vect_int_mult  } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 2 "slp2" } } */
+/* { dg-final { scan-tree-dump "vectorizing SLP node starting from: _\[0-9\]+
= _\[0-9\]+ \\\* a0" "slp2"  { target vect_int_mult } } } */


More information about the Gcc-bugs mailing list