https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68541
--- Comment #6 from Jeffrey A. Law <law at gcc dot gnu.org> --- Author: law Date: Fri Feb 5 23:49:08 2016 New Revision: 233191 URL: https://gcc.gnu.org/viewcvs?rev=233191&root=gcc&view=rev Log: PR tree-optimization/68541 * gimple-ssa-split-paths.c: Include tree-cfg.h and params.h. (count_stmts_in_block): New function. (poor_ifcvt_candidate_code): Likewise. (is_feasible_trace): Add some heuristics to determine when path splitting is profitable. (find_block_to_duplicate_for_splitting_paths): Make sure the graph is a diamond with a single exit. PR tree-optimization/68541 * gcc.dg/tree-ssa/split-path-2.c: New test. * gcc.dg/tree-ssa/split-path-3.c: New test. * gcc.dg/tree-ssa/split-path-4.c: New test. * gcc.dg/tree-ssa/split-path-5.c: New test. * gcc.dg/tree-ssa/split-path-6.c: New test. * gcc.dg/tree-ssa/split-path-7.c: New test. Added: trunk/gcc/testsuite/gcc.dg/tree-ssa/split-path-2.c trunk/gcc/testsuite/gcc.dg/tree-ssa/split-path-3.c trunk/gcc/testsuite/gcc.dg/tree-ssa/split-path-4.c trunk/gcc/testsuite/gcc.dg/tree-ssa/split-path-5.c trunk/gcc/testsuite/gcc.dg/tree-ssa/split-path-6.c trunk/gcc/testsuite/gcc.dg/tree-ssa/split-path-7.c Modified: trunk/gcc/ChangeLog trunk/gcc/gimple-ssa-split-paths.c trunk/gcc/testsuite/ChangeLog