While moving mergephi's forwarder block removal over to cfgcleanup,
I noticed a few regressions due to removal of a forwarder block (correctly)
but the counts were not updated, instead let these blocks be handled by the merge_blocks
cleanup code.
gcc/ChangeLog:
* tree-cfgcleanup.cc (tree_forwarder_block_p): Reject bb which has a single
predecessor which has a single successor.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
return false;
}
+ /* If this bb has a single predecessor and that predecssor
+ has a single successor, this bb will be merged with the
+ predecessor so ignore it for removing of the forwarder block. */
+ if (single_pred_p (bb)
+ && single_succ_p (single_pred_edge (bb)->src))
+ return false;
+
basic_block dest = single_succ_edge (bb)->dest;
/* Now walk through the statements backward. We can ignore labels,