diff mbox

[mem-ref2] Adjust more testcases

Message ID alpine.LNX.2.00.1006161659060.1429@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener June 16, 2010, 3:01 p.m. UTC
And remove two that are no longer useful.

Tested on x86_64-unknown-linux-gnu, applied.

Remaining gcc.dg/tree-ssa (and eventually real) issues:

XPASS: gcc.dg/tree-ssa/20031106-3.c scan-tree-dump-times optimized 
"link_error" 0
XPASS: gcc.dg/tree-ssa/20040204-1.c scan-tree-dump-times optimized 
"link_error" 0
FAIL: gcc.dg/tree-ssa/forwprop-1.c scan-tree-dump-times forwprop1 
"t\[i.*\] =.* 1;" 1
FAIL: gcc.dg/tree-ssa/forwprop-2.c scan-tree-dump-times forwprop1 
"t\[i.*\] =.* 1;" 1
XPASS: gcc.dg/tree-ssa/fre-vce-1.c scan-tree-dump-times fre "sv.i" 2
FAIL: gcc.dg/tree-ssa/restrict-3.c scan-tree-dump lim1 "Executing store 
motion of \*r"
FAIL: gcc.dg/tree-ssa/ssa-ccp-23.c scan-tree-dump ccp1 "a.i\[1\]"
FAIL: gcc.dg/tree-ssa/ssa-ccp-25.c scan-tree-dump ccp1 "&a\[[iD]\."
FAIL: gcc.dg/tree-ssa/ssa-ccp-25.c scan-tree-dump forwprop1 "= a\[[iD]\."
FAIL: gcc.dg/tree-ssa/ssa-ccp-26.c scan-tree-dump forwprop1 "= a\[D\."

most of the show the old C frontend issue with its array-ref lowering.

Richard.

2010-06-16  Richard Guenther  <rguenther@suse.de>

	* gcc.dg/tree-ssa/forwprop-8.c: Adjust.
	* gcc.dg/tree-ssa/ssa-ccp-21.c: Likewise.
	* gcc.dg/tree-ssa/forwprop-10.c: Likewise.
	* g++.dg/tree-ssa/pr33604.C: Likewise.
	* gcc.dg/tree-ssa/foldaddr-2.c: Remove.
	* gcc.dg/tree-ssa/foldaddr-3.c: Likewise.
diff mbox

Patch

Index: gcc/testsuite/gcc.dg/tree-ssa/forwprop-8.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/forwprop-8.c	(revision 160824)
+++ gcc/testsuite/gcc.dg/tree-ssa/forwprop-8.c	(working copy)
@@ -12,5 +12,5 @@  int foo(struct X *q)
 
 /* We should have propragated &q->a into (*pointer).  */
 /* { dg-final { scan-tree-dump-times "pointer" 0 "forwprop1"} } */
-/* { dg-final { scan-tree-dump "->a\\\[0\\\]" "forwprop1" } } */
+/* { dg-final { scan-tree-dump "\\\[0\\\]" "forwprop1" } } */
 /* { dg-final { cleanup-tree-dump "forwprop1" } } */
Index: gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-21.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-21.c	(revision 160824)
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-21.c	(working copy)
@@ -21,5 +21,9 @@  int bar (void)
   return q->i;
 }
 
-/* { dg-final { scan-tree-dump-times "a.b.i" 2 "ccp1" } } */
+/* The first access is through struct A, so a.b.i is fine,
+   the second access needs to preserve the original access type struct B.  */
+
+/* { dg-final { scan-tree-dump-times "a.b.i" 1 "ccp1" } } */
+/* { dg-final { scan-tree-dump-times "MEM\\\[\\\(struct B \\\*\\\)&a\\\].i" 1 "ccp1" } } */
 /* { dg-final { cleanup-tree-dump "ccp1" } } */
Index: gcc/testsuite/gcc.dg/tree-ssa/forwprop-10.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/forwprop-10.c	(revision 160824)
+++ gcc/testsuite/gcc.dg/tree-ssa/forwprop-10.c	(working copy)
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-forwprop1" } */
+/* { dg-options "-O -fdump-tree-fre-details" } */
 
 int b;
 unsigned a;
@@ -15,9 +15,8 @@  void test2(void)
 }
 
 /* The indirect load should be replaced by a load from a and a
-   conversion to int.  */
+   conversion to int.  FRE should then be able to replace
+   the rhs of the store to b by 1.  */
 
-/* { dg-final { scan-tree-dump "= a;" "forwprop1" } } */
-/* { dg-final { scan-tree-dump "= \\\(int\\\) " "forwprop1" } } */
-/* { dg-final { scan-tree-dump-not "= \\\*" "forwprop1" } } */
-/* { dg-final { cleanup-tree-dump "forwprop1" } } */
+/* { dg-final { scan-tree-dump "Replaced\[^\\n\]*with 1" "fre" } } */
+/* { dg-final { cleanup-tree-dump "fre" } } */
Index: gcc/testsuite/gcc.dg/tree-ssa/foldaddr-2.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/foldaddr-2.c	(revision 160824)
+++ gcc/testsuite/gcc.dg/tree-ssa/foldaddr-2.c	(working copy)
@@ -1,13 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-optimized" } */
-struct a{
-	int a;
-	int b;
-} a;
-int *
-t()
-{
-	return (int *)&a;
-}
-/* { dg-final { scan-tree-dump "a.a" "optimized"} } */
-/* { dg-final { cleanup-tree-dump "optimized" } } */
Index: gcc/testsuite/gcc.dg/tree-ssa/foldaddr-3.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/foldaddr-3.c	(revision 160824)
+++ gcc/testsuite/gcc.dg/tree-ssa/foldaddr-3.c	(working copy)
@@ -1,28 +0,0 @@ 
-/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-optimized" } */
-union a
-{
-  struct s1
-  {
-    long long a;
-    long long b;
-  } s1;
-  struct s2
-  {
-    int c;
-    int d;
-  } s2;
-  struct s3
-  {
-    unsigned long long e;
-    unsigned long long f;
-  } s3;
-} a;
-int *
-t ()
-{
-  return (int *) &a;
-}
-
-/* { dg-final { scan-tree-dump "a.s2.c" "optimized"} } */
-/* { dg-final { cleanup-tree-dump "optimized" } } */
Index: gcc/testsuite/g++.dg/tree-ssa/pr33604.C
===================================================================
--- gcc/testsuite/g++.dg/tree-ssa/pr33604.C	(revision 160824)
+++ gcc/testsuite/g++.dg/tree-ssa/pr33604.C	(working copy)
@@ -1,5 +1,5 @@ 
 /* { dg-do run } */
-/* { dg-options "-O -fdump-tree-forwprop1" } */
+/* { dg-options "-O -fdump-tree-optimized-vops" } */
 
 struct Value
 {
@@ -35,12 +35,14 @@  int main(int argc, char *argv[])
   return 0;
 }
 
-/* Check that we forward propagated
+/* Check that we propagate
      D.2182_13 = (struct Ref *) &D.2137.lhs;
    to
      D.2182_13->lhs.m ={v} &I;
    yielding
-     D.2137.lhs.m ={v} &I;  */
+     D.2137.lhs.m ={v} &I;
+   so that SRA can promote all locals to registers and we end up
+   referencing a single virtual operand at abort () after optimization.  */
 
-/* { dg-final { scan-tree-dump-times "D\\\.....\\\..hs\\\.m =" 2 "forwprop1" } } */
-/* { dg-final { cleanup-tree-dump "forwprop1" } } */
+/* { dg-final { scan-tree-dump-times ".MEM_\[0-9\]*\\\(D\\\)" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */