Should not sink instructions which may cause trap

2014-09-30  Jiong Wang  <jiong.wang@arm.com>

  gcc/
    * shrink-wrap.c (move_insn_for_shrink_wrap): Check "can_throw_internal"
    before sinking insn.

From-SVN: r215709
This commit is contained in:
Jiong Wang 2014-09-30 08:44:14 +00:00 committed by Jiong Wang
parent d1bb282efb
commit 2cfc4ade7a
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2014-09-30 Jiong Wang <jiong.wang@arm.com>
* shrink-wrap.c (move_insn_for_shrink_wrap): Check "can_throw_internal"
before sinking insn.
2014-09-30 David Sherwood <david.sherwood@arm.com>
* ira-int.h (ira_allocno): Add "wmode" field.

View file

@ -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)
{