Hi!

As mentioned in the PR, DOM/SLP can only handle the case when the stores
of the vector are in the same chunks as the reads from it, so the testcase
has lots of xfails for targets where this doesn't happen.
On x86 in the generic and many other tunings the vector is stored in the
same chunks as read, but when testing e.g. with -march=silvermont, the test
fails.  Until DOM/SLP is extended to handle this and all the xfails can be
removed, this patch forces -mtune=generic so that the test doesn't fail
with some tunings.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2018-02-09  Jakub Jelinek  <ja...@redhat.com>

        PR tree-optimization/84232
        * gcc.dg/tree-ssa/ssa-dom-cse-2.c: Add -mtune-generic on x86.

--- gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c.jj    2018-01-30 
12:30:26.394360763 +0100
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c       2018-02-08 
16:21:41.506236052 +0100
@@ -2,8 +2,10 @@
 /* { dg-options "-O3 -fno-tree-fre -fno-tree-pre -fdump-tree-optimized --param 
sra-max-scalarization-size-Ospeed=32" } */
 /* System Z needs hardware vector support for this to work (the optimization
    gets too complex without it.
-   { dg-additional-options "-march=z13" { target { s390x-*-* } } } */
-
+   { dg-additional-options "-march=z13" { target s390x-*-* } } */
+/* Use generic tuning on x86 for the same reasons as why alpha, powerpc etc. 
are
+   xfailed below.
+   { dg-additional-options "-mtune=generic" { target i?86-*-* x86_64-*-* } } */
 
 int
 foo ()

        Jakub

Reply via email to