From 2cfc4ade7a49eca3b1f1a545765c85bb92019869 Mon Sep 17 00:00:00 2001 From: Jiong Wang Date: Tue, 30 Sep 2014 08:44:14 +0000 Subject: [PATCH] Should not sink instructions which may cause trap 2014-09-30 Jiong Wang gcc/ * shrink-wrap.c (move_insn_for_shrink_wrap): Check "can_throw_internal" before sinking insn. From-SVN: r215709 --- gcc/ChangeLog | 5 +++++ gcc/shrink-wrap.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d224b0fd3bf..9e78a93f569 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-09-30 Jiong Wang + + * shrink-wrap.c (move_insn_for_shrink_wrap): Check "can_throw_internal" + before sinking insn. + 2014-09-30 David Sherwood * ira-int.h (ira_allocno): Add "wmode" field. diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c index bd4813c82ae..b1ff8a255f8 100644 --- a/gcc/shrink-wrap.c +++ b/gcc/shrink-wrap.c @@ -189,6 +189,9 @@ move_insn_for_shrink_wrap (basic_block bb, rtx_insn *insn, unsigned int nonconstobj_num = 0; rtx src_inner = NULL_RTX; + if (can_throw_internal (insn)) + return false; + subrtx_var_iterator::array_type array; FOR_EACH_SUBRTX_VAR (iter, array, src, ALL) { -- 2.30.2