Fix bb-reorder problem with degenerate cond_jump (PR68182)
commitd4c8d5ede1f35643163942af46bcb51d3c03c8d7
authorSegher Boessenkool <segher@gcc.gnu.org>
Mon, 9 Nov 2015 03:57:19 +0000 (9 04:57 +0100)
committerSegher Boessenkool <segher@gcc.gnu.org>
Mon, 9 Nov 2015 03:57:19 +0000 (9 04:57 +0100)
tree92c30a93ee2301b6249676d7703cf0c1b1f955cc
parent4f70cb39c0032dee5caf7b0851556959649895ff
Fix bb-reorder problem with degenerate cond_jump (PR68182)

The code mistakenly thinks any cond_jump has two successors.  This is
not true if both destinations are the same, as can happen with weird
patterns as in the PR.

PR rtl-optimization/68182
* gcc/bb-reorder.c (reorder_basic_blocks_simple): Treat a conditional
branch with only one successor just like unconditional branches.

From-SVN: r229983
gcc/ChangeLog
gcc/bb-reorder.c