]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
test: Isolate slp-1.c check of target supports vect_strided5
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Fri, 15 Sep 2023 09:16:36 +0000 (17:16 +0800)
committerPan Li <pan2.li@intel.com>
Fri, 15 Sep 2023 11:07:02 +0000 (19:07 +0800)
This test failed in RISC-V:
FAIL: gcc.dg/vect/slp-1.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorizing stmts using SLP" 4
FAIL: gcc.dg/vect/slp-1.c scan-tree-dump-times vect "vectorizing stmts using SLP" 4

Because this loop:
  /* SLP with unrolling by 8.  */
  for (i = 0; i < N; i++)
    {
      out[i*5] = 8;
      out[i*5 + 1] = 7;
      out[i*5 + 2] = 81;
      out[i*5 + 3] = 28;
      out[i*5 + 4] = 18;
    }

is using vect_load_lanes with array size = 5.
instead of SLP.

When we adjust the COST of LANES load store, then it will use SLP.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/slp-1.c: Add vect_stried5.

gcc/testsuite/gcc.dg/vect/slp-1.c

index 82e4f6469fb9484f84c5c832d0461576b63ba8fe..d4a13f12df664f76cd69c158df844ed3a202f350 100644 (file)
@@ -122,5 +122,5 @@ int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect"  } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" } } */
-  
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { target {! vect_strided5 } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { target vect_strided5 } } } */