From e2da9ffe3c90b3a460b5fbbea7ee3aa7941882d1 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 25 Aug 2017 21:51:00 +0930 Subject: [PATCH] PR81747, ICE in operator[] 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 | 7 +++++++ gcc/cse.c | 1 + 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4f2350a2cc6..7d03c8a2498 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-08-25 Alan Modra + + 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 PR middle-end/81908 diff --git a/gcc/cse.c b/gcc/cse.c index dfcebbfbc02..191fd0699fb 100644 --- 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)) -- 2.30.2