gcse.c (find_moveable_store): Do not accept store insns with REG_EH_REGION note.
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 28 Apr 2004 14:34:51 +0000 (14:34 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Wed, 28 Apr 2004 14:34:51 +0000 (14:34 +0000)
* gcse.c (find_moveable_store): Do not accept store insns with
REG_EH_REGION note.

From-SVN: r81249

gcc/ChangeLog
gcc/gcse.c

index f4c5273..e750885 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-28  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * gcse.c (find_moveable_store): Do not accept store insns with 
+       REG_EH_REGION note.
+
 2004-04-28  Paul Brook  <paul@codesourcery.com>
 
        * calls.c (precompute_arguments): Remove PROMOTE_FOR_CALL_ONLY.
index 88f94f6..7442faa 100644 (file)
@@ -7175,6 +7175,11 @@ find_moveable_store (rtx insn, int *regs_set_before, int *regs_set_after)
   if (flag_non_call_exceptions && may_trap_p (dest))
     return;
 
+  /* Even if the destination cannot trap, the source may.  In this case we'd
+     need to handle updating the REG_EH_REGION note.  */
+  if (find_reg_note (insn, REG_EH_REGION, NULL_RTX))
+    return;
+
   ptr = ldst_entry (dest);
   if (!ptr->pattern_regs)
     ptr->pattern_regs = extract_mentioned_regs (dest);