diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-14 17:45:20 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-14 17:45:20 +0000 |
commit | f04611823eefbfc850d6c41383b5057f83ed52d6 (patch) | |
tree | 6a21584555a95637041cdcc5a5ce839bf4a94df4 /gcc | |
parent | 404d6be4313f6d4730c2cacecb097a7c9674f8f9 (diff) | |
download | gcc-f04611823eefbfc850d6c41383b5057f83ed52d6.tar.gz |
2008-03-14 Richard Guenther <rguenther@suse.de>
PR tree-optimization/13761
* gcc.dg/tree-ssa/ssa-lim-3.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133224 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f93230a95ae..93b5b842d8e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2008-03-14 Richard Guenther <rguenther@suse.de> + PR tree-optimization/13761 + * gcc.dg/tree-ssa/ssa-lim-3.c: New testcase. + +2008-03-14 Richard Guenther <rguenther@suse.de> + PR tree-optimization/34172 * gcc.dg/tree-ssa/ssa-fre-11.c: New testcase. * gcc.dg/tree-ssa/ssa-fre-12.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c new file mode 100644 index 00000000000..bfd8692e72e --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-3.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-lim-details -fdump-tree-optimized" } */ + +struct { int x; int y; } global; +void foo(int n) +{ + int i; + for ( i=0; i<n; i++) + global.y += global.x*global.x; +} + +/* { dg-final { scan-tree-dump "Executing store motion of global.y" "lim" } } */ +/* { dg-final { scan-tree-dump "Moving statement.*global.x.*out of loop 1" "lim" } } */ +/* { dg-final { cleanup-tree-dump "lim" } } */ |