diff options
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 45d4048..41f69da 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -82,6 +82,7 @@ along with GCC; see the file COPYING3. If not see #include "target.h" #include "rtl.h" #include "tree.h" +#include "cfghooks.h" #include "predict.h" #include "df.h" #include "memmodel.h" @@ -4620,6 +4621,25 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0, update_cfg_for_uncondjump (undobuf.other_insn); } + if (GET_CODE (PATTERN (i3)) == TRAP_IF + && XEXP (PATTERN (i3), 0) == const1_rtx) + { + basic_block bb = BLOCK_FOR_INSN (i3); + gcc_assert (bb); + remove_edge (split_block (bb, i3)); + *new_direct_jump_p = 1; + } + + if (undobuf.other_insn + && GET_CODE (PATTERN (undobuf.other_insn)) == TRAP_IF + && XEXP (PATTERN (undobuf.other_insn), 0) == const1_rtx) + { + basic_block bb = BLOCK_FOR_INSN (undobuf.other_insn); + gcc_assert (bb); + remove_edge (split_block (bb, undobuf.other_insn)); + *new_direct_jump_p = 1; + } + /* A noop might also need cleaning up of CFG, if it comes from the simplification of a jump. */ if (JUMP_P (i3) |