From 3bd241172417b6329baf196858143269c4b362e5 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 18 Feb 2001 12:06:51 -0800 Subject: [PATCH] ifcvt.c (dead_or_predicable): Don't move code if eh regions would be disrupted. * ifcvt.c (dead_or_predicable): Don't move code if eh regions would be disrupted. From-SVN: r39843 --- gcc/ChangeLog | 5 +++++ gcc/ifcvt.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b6e2a47e6ae..3e663b3b9b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-02-18 Richard Henderson + + * ifcvt.c (dead_or_predicable): Don't move code if eh regions + would be disrupted. + 2001-02-18 Richard Henderson * config/ns32k/ns32k.h (ADJSP): Upcase arguments. diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 652814e4b39..a5494b85f6f 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -1855,6 +1855,15 @@ dead_or_predicable (test_bb, merge_bb, other_bb, new_dest, reversep) { rtx head, end, jump, earliest, old_dest; + /* No code movement can occur if we'd be scrogging EH regions. + Within MERGE_BB, ensure that we've not got stray EH_BEG or EH_END + notes within the block. Between the blocks, checking that the end + region numbers match ensures that we won't disrupt the nesting + between regions. */ + if (merge_bb->eh_beg != merge_bb->eh_end + || merge_bb->eh_end != test_bb->eh_end) + return FALSE; + jump = test_bb->end; /* Find the extent of the real code in the merge block. */