testsuite: Adjust pr96789.c by disabling loop vect
authorKewen Lin <linkw@linux.ibm.com>
Thu, 12 Nov 2020 03:18:23 +0000 (21:18 -0600)
committerKewen Lin <linkw@linux.ibm.com>
Thu, 12 Nov 2020 03:25:08 +0000 (21:25 -0600)
New test gcc.dg/tree-ssa/pr96789.c fails on
arm-none-linux-gnueabihf since loop vectorizer is able to optimize
the two loops which operate on array tmp with load_lanes feature
support, it make dse3 fail to find expected inputs.

As Richard suggested, this patch is to replace option
-ftree-vectorize to -ftree-slp-vectorize -fno-tree-loop-vectorize.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/pr96789.c: Adjusted by disabling loop
vectorization.

gcc/testsuite/gcc.dg/tree-ssa/pr96789.c

index d6139a014d8274cba4d244eecf576fe13b36b490..5704952309b72cc1838115ef70f97eb3e9888173 100644 (file)
@@ -1,5 +1,8 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -funroll-loops -ftree-vectorize -fdump-tree-dse-details" } */
+/* Disable loop vectorization to avoid that loop vectorizer
+   optimizes those two loops that operate tmp array so that
+   subsequent dse3 won't eliminate expected tmp stores.  */
+/* { dg-options "-O2 -funroll-loops -ftree-slp-vectorize -fno-tree-loop-vectorize -fdump-tree-dse-details" } */
 
 /* Test if scalar cleanup pass takes effects, mainly check
    its secondary pass DSE can remove dead stores on array