This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Minor testsuite fallout for pr90883.C


So a couple of things can come into play that make this test target
dependent.

First, on some targets we emit a loop to zero the objects.  Thankfully
we can use -Os which gets us an empty constructor node again.  That
seems to make several unhappy targets happy again.

On i?86 (and perhaps other targets), the redundant store isn't exposed
until a late inlining, which means we need to check dse2 rather than
dse1 for the message that it deleted a redundant store.

Installing on the trunk,

Jeff

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 55deef7255d..9bb683facbd 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2019-07-02  Jeff Law  <law@redhat.com>
+
+	PR tree-optimization/90883
+	* g++.dg/tree-ssa/pr90883.c: Add -Os.  Check dse2 for the
+	deleted store on some targets.
+
 2019-07-02  qing zhao  <qing.zhao@oracle.com>
 
 	PR preprocessor/90581
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr90883.C b/gcc/testsuite/g++.dg/tree-ssa/pr90883.C
index 005b2103b4b..c5faffa1f32 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr90883.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr90883.C
@@ -1,4 +1,4 @@
-// { dg-options "-O2 -fdump-tree-dse1-details -std=c++11" }
+// { dg-options "-O2 -Os -fdump-tree-dse-details -std=c++11" }
 
 
     class C
@@ -15,5 +15,6 @@
 
 // We want to match enough here to capture that we deleted an empty
 // constructor store
-// { dg-final { scan-tree-dump "Deleted redundant store: .*\.a = {}" "dse1" } }
+// { dg-final { scan-tree-dump "Deleted redundant store: .*\.a = {}" "dse1" { target { ! i?86-*-* } } } }
+// { dg-final { scan-tree-dump "Deleted redundant store: .*\.a = {}" "dse2" { target i?86-*-* } } }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]