diff mbox series

bb-reorder: Remove a misfiring micro-optimization (PR96475)

Message ID d78cbb4e672ef835e6432822c210a54eb0d2cea2.1596766524.git.segher@kernel.crashing.org
State New
Headers show
Series bb-reorder: Remove a misfiring micro-optimization (PR96475) | expand

Commit Message

Segher Boessenkool Aug. 7, 2020, 2:17 a.m. UTC
When the compgotos pass copies the tail of blocks ending in an indirect
jump, there is a micro-optimization to not copy the last one, since the
original block will then just be deleted.  This does not work properly
if cleanup_cfg does not merge all pairs of blocks we expect it to.

2020-08-07  Segher Boessenkool  <segher@kernel.crashing.org>

	PR rtl-optimization/96475
	* bb-reorder.c (maybe_duplicate_computed_goto): Remove single_pred_p
 gcc/bb-reorder.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series


diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index c635010..f7a7de8 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -2680,9 +2680,6 @@  make_pass_reorder_blocks (gcc::context *ctxt)
 static bool
 maybe_duplicate_computed_goto (basic_block bb, int max_size)
-  if (single_pred_p (bb))
-    return false;
   /* Make sure that the block is small enough.  */
   rtx_insn *insn;
   FOR_BB_INSNS (bb, insn)