re PR middle-end/54520 (ice in merge_latch_edges with -O3)
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. * gcc.dg/torture/pr54520.c: New testcase. From-SVN: r191141
This commit is contained in:
parent
8f5a5a8ecd
commit
1779dc343a
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
15
gcc/testsuite/gcc.dg/torture/pr54520.c
Normal file
15
gcc/testsuite/gcc.dg/torture/pr54520.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-do compile } */
|
||||
|
||||
char *a;
|
||||
void
|
||||
fn1 ()
|
||||
{
|
||||
char *p = a;
|
||||
while (p && *p != '\0')
|
||||
{
|
||||
while (*p == '\t')
|
||||
*p++ = '\0';
|
||||
if (*p != '\0')
|
||||
p = 0;
|
||||
}
|
||||
}
|
@ -846,8 +846,9 @@ static bool
|
||||
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.
|
||||
@ -1031,6 +1032,7 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers)
|
||||
nblocks = dfs_enumerate_from (header, 0, def_split_header_continue_p,
|
||||
bblocks, loop->num_nodes, tgt_bb);
|
||||
for (i = 0; i < nblocks; i++)
|
||||
if (bblocks[i]->loop_father == loop)
|
||||
{
|
||||
remove_bb_from_loops (bblocks[i]);
|
||||
add_bb_to_loop (bblocks[i], loop_outer (loop));
|
||||
|
Loading…
Reference in New Issue
Block a user