tree-if-conv.c (process_phi_nodes): Process latch block.
* tree-if-conv.c (process_phi_nodes): Process latch block. (combine_blocks): Process latch block and update loop structure. * gcc.dg/pr17635.c : New test. From-SVN: r89045
This commit is contained in:
parent
1399eca190
commit
0ecf0d5f41
3 changed files with 21 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-10-14 Devang Patel <dpatel@apple.com>
|
||||
|
||||
PR 17635
|
||||
* tree-if-conv.c (process_phi_nodes): Process latch block.
|
||||
(combine_blocks): Process latch block and update loop structure.
|
||||
|
||||
2004-10-14 Olga Golovanevsky <olga@il.ibm.com>
|
||||
|
||||
* tree-vectorizer.c (vect_generate_tmps_on_preheader):
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2004-10-14 Devang Patel <dpatel@apple.com>
|
||||
|
||||
PR 17635
|
||||
* gcc.dg/pr17635.c : New test.
|
||||
|
||||
2004-10-14 Olga GOlovanevsky <olga@il.ibm.com>
|
||||
|
||||
* testsuite/gcc.dg/vect/vect-28.c : Remove xfail.
|
||||
|
|
|
@ -815,7 +815,7 @@ process_phi_nodes (struct loop *loop)
|
|||
basic_block true_bb = NULL;
|
||||
bb = ifc_bbs[i];
|
||||
|
||||
if (bb == loop->header || bb == loop->latch)
|
||||
if (bb == loop->header)
|
||||
continue;
|
||||
|
||||
phi = phi_nodes (bb);
|
||||
|
@ -863,9 +863,6 @@ combine_blocks (struct loop *loop)
|
|||
|
||||
bb = ifc_bbs[i];
|
||||
|
||||
if (bb == loop->latch)
|
||||
continue;
|
||||
|
||||
if (!exit_bb && bb_with_exit_edge_p (bb))
|
||||
exit_bb = bb;
|
||||
|
||||
|
@ -891,6 +888,9 @@ combine_blocks (struct loop *loop)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (bb == loop->latch && empty_block_p (bb))
|
||||
continue;
|
||||
|
||||
/* It is time to remove this basic block. First remove edges. */
|
||||
while (EDGE_COUNT (bb->succs) > 0)
|
||||
ssa_remove_edge (EDGE_SUCC (bb, 0));
|
||||
|
@ -921,6 +921,8 @@ combine_blocks (struct loop *loop)
|
|||
delete_from_dominance_info (CDI_POST_DOMINATORS, bb);
|
||||
|
||||
/* Remove basic block. */
|
||||
if (bb == loop->latch)
|
||||
loop->latch = merge_target_bb;
|
||||
remove_bb_from_loops (bb);
|
||||
expunge_block (bb);
|
||||
}
|
||||
|
@ -928,7 +930,10 @@ combine_blocks (struct loop *loop)
|
|||
/* Now if possible, merge loop header and block with exit edge.
|
||||
This reduces number of basic blocks to 2. Auto vectorizer addresses
|
||||
loops with two nodes only. FIXME: Use cleanup_tree_cfg(). */
|
||||
if (exit_bb != loop->latch && empty_block_p (loop->latch))
|
||||
if (exit_bb
|
||||
&& loop->header != loop->latch
|
||||
&& exit_bb != loop->latch
|
||||
&& empty_block_p (loop->latch))
|
||||
{
|
||||
if (can_merge_blocks_p (loop->header, exit_bb))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue