PR81747, ICE in operator[]
authorAlan Modra <amodra@gmail.com>
Fri, 25 Aug 2017 12:21:00 +0000 (21:51 +0930)
committerAlan Modra <amodra@gcc.gnu.org>
Fri, 25 Aug 2017 12:21:00 +0000 (21:51 +0930)
PR rtl-optimization/81747
* cse.c (cse_extended_basic_block): Don't attempt to record
equivalences for degenerate conditional branches that branch
to their fall-through.

From-SVN: r251349

gcc/ChangeLog
gcc/cse.c

index 4f2350a2cc60aaeaf784fe72d0c064f2a4717a5d..7d03c8a2498e3e75a83193bdd5f3d3b4b8dab53b 100644 (file)
@@ -1,3 +1,10 @@
+2017-08-25  Alan Modra  <amodra@gmail.com>
+
+       PR rtl-optimization/81747
+       * cse.c (cse_extended_basic_block): Don't attempt to record
+       equivalences for degenerate conditional branches that branch
+       to their fall-through.
+
 2017-08-24  Martin Sebor  <msebor@redhat.com>
 
        PR middle-end/81908
index dfcebbfbc02a18390243e60c3098da74a5556608..191fd0699fbb4023c56cdd6b6ecc23e9cbb86661 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -6640,6 +6640,7 @@ cse_extended_basic_block (struct cse_basic_block_data *ebb_data)
         equivalences due to the condition being tested.  */
       insn = BB_END (bb);
       if (path_entry < path_size - 1
+         && EDGE_COUNT (bb->succs) == 2
          && JUMP_P (insn)
          && single_set (insn)
          && any_condjump_p (insn))