From: Jiong Wang Date: Tue, 30 Sep 2014 08:44:14 +0000 (+0000) Subject: Should not sink instructions which may cause trap X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2cfc4ade7a49eca3b1f1a545765c85bb92019869;p=gcc.git 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 --- 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) {