[Bug tree-optimization/15255] [tree-ssa] a * 2 + a * 2 is not converted to a * 4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15255 Bug 15255 depends on bug 15459, which changed state. Bug 15459 Summary: [meta-bug] there should be a tree combiner like the rtl one https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15459 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug tree-optimization/15255] [tree-ssa] a * 2 + a * 2 is not converted to a * 4
--- Comment #12 from rguenth at gcc dot gnu dot org 2008-08-13 09:00 --- Fixed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.4.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15255
[Bug tree-optimization/15255] [tree-ssa] a * 2 + a * 2 is not converted to a * 4
--- 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
[Bug tree-optimization/15255] [tree-ssa] a * 2 + a * 2 is not converted to a * 4
--- Comment #10 from rguenth at gcc dot gnu dot org 2008-04-29 16:03 --- The fold missed optimizations are fixed. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15255
[Bug tree-optimization/15255] [tree-ssa] a * 2 + a * 2 is not converted to a * 4
--- Comment #9 from rguenth at gcc dot gnu dot org 2008-04-29 16:00 --- Subject: Bug 15255 Author: rguenth Date: Tue Apr 29 15:59:43 2008 New Revision: 134798 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134798 Log: 2008-04-29 Richard Guenther <[EMAIL PROTECTED]> PR middle-end/15255 * fold-const.c (fold_binary): Fold (A + A) * C to A * 2*C. * gcc.dg/fold-plusmult.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/fold-plusmult.c Modified: trunk/gcc/ChangeLog trunk/gcc/fold-const.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15255
[Bug tree-optimization/15255] [tree-ssa] a * 2 + a * 2 is not converted to a * 4
--- Comment #8 from rguenth at gcc dot gnu dot org 2008-04-29 14:17 --- We already handle most of the foldings in fold_plusminus_mult_expr, just the A + A -> 2 * A folding is not done (for a reason). We also miss (A + A) * Cst -> A * 2 * Cst, which is what I am going to implement in addition to extending the tree re-association pass. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15255
[Bug tree-optimization/15255] [tree-ssa] a * 2 + a * 2 is not converted to a * 4
--- Comment #7 from rguenth at gcc dot gnu dot org 2008-04-28 20:19 --- Mine. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2006-02-20 18:43:31 |2008-04-28 20:19:51 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15255
[Bug tree-optimization/15255] [tree-ssa] a * 2 + a * 2 is not converted to a * 4
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-15 22:22 --- As I said before I was not going to fix a fold problem (for the first testcase). -- What|Removed |Added AssignedTo|pinskia at gcc dot gnu dot |unassigned at gcc dot gnu |org |dot org Status|ASSIGNED|NEW http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15255