aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-12-14 00:33:57 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-12-14 00:33:57 +0100
commitb532a7859f749a302748214a75d565a8f7b90358 (patch)
tree33c7c59992c9696d1428e3caafe762ef59ddb454 /gcc/cfgcleanup.c
parent6bb4268527df596e72a964f94873162b595fb483 (diff)
downloadgcc-b532a7859f749a302748214a75d565a8f7b90358.zip
gcc-b532a7859f749a302748214a75d565a8f7b90358.tar.gz
gcc-b532a7859f749a302748214a75d565a8f7b90358.tar.bz2
re PR rtl-optimization/88470 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2354)
PR rtl-optimization/88470 * cfgcleanup.c (outgoing_edges_match): If the function is shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake edge to EXIT, return false. * gcc.target/i386/pr88470.c: New test. From-SVN: r267112
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index bc4a788..1b5e931 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -1592,10 +1592,13 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2)
if (crtl->shrink_wrapped
&& single_succ_p (bb1)
&& single_succ (bb1) == EXIT_BLOCK_PTR_FOR_FN (cfun)
- && !JUMP_P (BB_END (bb1))
+ && (!JUMP_P (BB_END (bb1))
+ /* Punt if the only successor is a fake edge to exit, the jump
+ must be some weird one. */
+ || (single_succ_edge (bb1)->flags & EDGE_FAKE) != 0)
&& !(CALL_P (BB_END (bb1)) && SIBLING_CALL_P (BB_END (bb1))))
return false;
-
+
/* If BB1 has only one successor, we may be looking at either an
unconditional jump, or a fake edge to exit. */
if (single_succ_p (bb1)