------- Comment #11 from rguenth at gcc dot gnu dot org 2008-08-13 08:58 ------- Subject: Bug 15255
Author: rguenth Date: Wed Aug 13 08:57:20 2008 New Revision: 139048 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139048 Log: 2008-08-13 Richard Guenther <[EMAIL PROTECTED]> PR tree-optimization/15255 * tree-ssa-reassoc.c (linearize_expr_tree): Declare. (struct oecount_s): New struct and VEC types. (cvec): New global. (oecount_hash): New function. (oecount_eq): Likewise. (oecount_cmp): Likewise. (zero_one_operation): New function. (build_and_add_sum): Likewise. (undistribute_ops_list): Perform un-distribution of multiplication and division on the chain of summands. (should_break_up_subtract): Also break up subtracts for factors. (reassociate_bb): Delete dead visited statements. Call undistribute_ops_list. Re-sort and optimize if it did something. * passes.c (init_optimization_passes): Move DSE before reassociation. * tree-ssa-loop-niter.c (stmt_dominates_stmt_p): Correctly handle PHI nodes. * gcc.dg/tree-ssa/reassoc-14.c: New testcase. * gcc.dg/tree-ssa/reassoc-15.c: Likewise. * gcc.dg/tree-ssa/reassoc-16.c: Likewise. * gcc.dg/torture/reassoc-1.c: Likewise. * gcc.dg/tree-ssa/recip-2.c: Adjust. * gcc.dg/tree-ssa/recip-6.c: Likewise. * gcc.dg/tree-ssa/recip-7.c: Likewise. * gfortran.dg/reassoc_4.f: Likewise. Added: trunk/gcc/testsuite/gcc.dg/torture/reassoc-1.c trunk/gcc/testsuite/gcc.dg/tree-ssa/reassoc-14.c trunk/gcc/testsuite/gcc.dg/tree-ssa/reassoc-15.c trunk/gcc/testsuite/gcc.dg/tree-ssa/reassoc-16.c trunk/gcc/testsuite/gcc.dg/tree-ssa/reassoc-17.c trunk/gcc/testsuite/gcc.dg/tree-ssa/reassoc-18.c trunk/gcc/testsuite/gfortran.dg/reassoc_4.f Modified: trunk/gcc/ChangeLog trunk/gcc/passes.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-2.c trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-6.c trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-7.c trunk/gcc/tree-ssa-loop-niter.c trunk/gcc/tree-ssa-reassoc.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15255