From 466e11c3c0c21f33c90217f63c2be062186bbc77 Mon Sep 17 00:00:00 2001 From: rguenth Date: Mon, 10 Mar 2008 17:14:45 +0000 Subject: 2008-03-10 Richard Guenther PR tree-optimization/34677 * tree-ssa-pre.c (modify_expr_node_pool): Remove. (poolify_tree): Likewise. (modify_expr_template): Likewise. (poolify_modify_stmt): Likewise. (insert_fake_stores): Handle all component-ref style stores in addition to INDIRECT_REF. Also handle complex types. Do not poolify the inserted load. (realify_fake_stores): Do not rebuild the tree but only make it a SSA_NAME copy. (init_pre): Remove initialzation of modify_expr_template. Do not allocate modify_expr_node_pool. (fini_pre): Do not free modify_expr_node_pool. * gcc.dg/tree-ssa/loadpre23.c: New testcase. * gcc.dg/tree-ssa/loadpre24.c: Likewise. * gcc.dg/tree-ssa/loadpre25.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133081 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/gcc.dg/tree-ssa/loadpre25.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/loadpre25.c (limited to 'gcc/testsuite/gcc.dg/tree-ssa/loadpre25.c') diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loadpre25.c b/gcc/testsuite/gcc.dg/tree-ssa/loadpre25.c new file mode 100644 index 00000000000..aaf09313e79 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/loadpre25.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-pre-stats" } */ +struct X { int i; }; +int foo(struct X *a, int argc) +{ + int b; + int c; + int i; + int d, e; + + for (i = 0; i < argc; i++) + { + e = a->i; + a->i = 9; + } + return d + e; +} + +/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre" } } */ +/* { dg-final { cleanup-tree-dump "pre" } } */ -- cgit v1.2.1