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]

[PATCH] Fix testsuite fallout from forwprop patch on the mainline


It's a bit unfortunate we don't have aliasing during early optimization
and so we set has_volatile_ops on all stmts to prevent optimization passes
to go crazy.  So I had to adjust some testsuite patterns to honor this
after the forwprop change.  Hopefully we get back the early optimizations
by some early aliasing, so I left the old scans there, but xfailed.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to the 
mainline.

Richard.

2007-05-13  Richard Guenther  <rguenther@suse.de>

	* gcc.dg/tree-ssa/pr17141-1.c: Scan in forwprop2, xfail
	scanning forwprop1.
	* g++.dg/tree-ssa/pr31146.C: Likewise.

Index: testsuite/gcc.dg/tree-ssa/pr17141-1.c
===================================================================
*** testsuite/gcc.dg/tree-ssa/pr17141-1.c	(revision 124651)
--- testsuite/gcc.dg/tree-ssa/pr17141-1.c	(working copy)
***************
*** 1,6 ****
  /* { dg-do compile } */
! /* { dg-options "-O2 -fdump-tree-forwprop2" } */
! 
  
  struct A { int i; };
  int
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O2 -fdump-tree-forwprop" } */
  
  struct A { int i; };
  int
*************** foo(struct A *locp, int str)
*** 12,18 ****
    return locp->i;
  }
  
! /* { dg-final { scan-tree-dump-times "&" 0 "forwprop2" } } */
! /* { dg-final { cleanup-tree-dump "forwprop2" } } */
! 
! 
--- 11,16 ----
    return locp->i;
  }
  
! /* { dg-final { scan-tree-dump "locp.*->i =" "forwprop1" { xfail *-*-* } } } */
! /* { dg-final { scan-tree-dump "locp.*->i =" "forwprop2" } } */
! /* { dg-final { cleanup-tree-dump "forwprop?" } } */
Index: testsuite/g++.dg/tree-ssa/pr31146.C
===================================================================
*** testsuite/g++.dg/tree-ssa/pr31146.C	(revision 124651)
--- testsuite/g++.dg/tree-ssa/pr31146.C	(working copy)
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O -fdump-tree-forwprop1" } */
  
  /* We should be able to optimize this to i[j] = 1 during
     early optimizations.  */
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O -fdump-tree-forwprop" } */
  
  /* We should be able to optimize this to i[j] = 1 during
     early optimizations.  */
*************** void foo (int j)
*** 12,16 ****
    *q = 1;
  }
  
! /* { dg-final { scan-tree-dump "i\\\[j.*\\\] = 1;" "forwprop1" } } */
! /* { dg-final { cleanup-tree-dump "forwprop1" } } */
--- 12,17 ----
    *q = 1;
  }
  
! /* { dg-final { scan-tree-dump "i\\\[j.*\\\] = 1;" "forwprop1" { xfail *-*-* } } } */
! /* { dg-final { scan-tree-dump "i\\\[j.*\\\] = 1;" "forwprop2" } } */
! /* { dg-final { cleanup-tree-dump "forwprop?" } } */


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