+2012-09-10 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54520
+ * tree-ssa-threadupdate.c (def_split_header_continue_p):
+ Properly consider sub-loops.
+
2012-09-10 Richard Henderson <rth@redhat.com>
* config/alpha/predicates.md (small_symbolic_operand): Disallow
+2012-09-10 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54520
+ * gcc.dg/torture/pr54520.c: New testcase.
+
2012-09-10 Jason Merrill <jason@redhat.com>
PR c++/54506
def_split_header_continue_p (const_basic_block bb, const void *data)
{
const_basic_block new_header = (const_basic_block) data;
- return (bb->loop_father == new_header->loop_father
- && bb != new_header);
+ return (bb != new_header
+ && (loop_depth (bb->loop_father)
+ >= loop_depth (new_header->loop_father)));
}
/* Thread jumps through the header of LOOP. Returns true if cfg changes.
nblocks = dfs_enumerate_from (header, 0, def_split_header_continue_p,
bblocks, loop->num_nodes, tgt_bb);
for (i = 0; i < nblocks; i++)
- {
- remove_bb_from_loops (bblocks[i]);
- add_bb_to_loop (bblocks[i], loop_outer (loop));
- }
+ if (bblocks[i]->loop_father == loop)
+ {
+ remove_bb_from_loops (bblocks[i]);
+ add_bb_to_loop (bblocks[i], loop_outer (loop));
+ }
free (bblocks);
/* If the new header has multiple latches mark it so. */