2013-04-19 Richard Biener PR tree-optimization/57000 * tree-ssa-reassoc.c (pass_reassoc): Add TODO_update_ssa_only_virtuals. * gcc.dg/tree-ssa/reassoc-27.c: New testcase. --- gcc/tree-ssa-reassoc.c (revision 198086) +++ gcc/tree-ssa-reassoc.c (revision 198087) @@ -4293,6 +4293,7 @@ struct gimple_opt_pass pass_reassoc = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_verify_ssa + | TODO_update_ssa_only_virtuals | TODO_verify_flow | TODO_ggc_collect /* todo_flags_finish */ } --- gcc/testsuite/gcc.dg/tree-ssa/reassoc-27.c (revision 0) +++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-27.c (revision 198087) @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O -ffast-math -frounding-math -fdump-tree-optimized" } */ + +double baz (double foo, double bar) +{ + return foo * foo * foo * foo * bar * bar * bar * bar; +} + +/* We should re-associate this as (foo * bar)**3. */ +/* { dg-final { scan-tree-dump-times " \\\* " 3 "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */