local-alloc.c (update_equiv_regs): Do not move insns that can throw.
authorRichard Henderson <rth@redhat.com>
Mon, 6 Aug 2001 06:41:46 +0000 (23:41 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 6 Aug 2001 06:41:46 +0000 (23:41 -0700)
        * local-alloc.c (update_equiv_regs): Do not move insns that
        can throw.

From-SVN: r44655

gcc/ChangeLog
gcc/local-alloc.c

index 293b81df9509f5f8db30d3093b179761ad46ebea..0e35ab36cf85f7114503e8e087a4b79a97ec3c61 100644 (file)
@@ -1,3 +1,8 @@
+2001-08-05  Richard Henderson  <rth@redhat.com>
+
+       * local-alloc.c (update_equiv_regs): Do not move insns that
+       can throw.
+
 2001-08-05  Jan Hubicka  <jh@suse.cz>
 
        * Makefile.in (reload1.o): Add dedendancy on except.h
index a068db8385d3964a06516573ea8c0b1542622065..c987190698effbd67b8a5acb6754edad19156242 100644 (file)
@@ -1102,6 +1102,12 @@ update_equiv_regs ()
                abort ();
              equiv_insn = XEXP (reg_equiv[regno].init_insns, 0);
 
+             /* We may not move instructions that can throw, since
+                that changes basic block boundaries and we are not
+                prepared to adjust the CFG to match.  */
+             if (can_throw_internal (equiv_insn))
+               continue;
+
              if (asm_noperands (PATTERN (equiv_insn)) < 0
                  && validate_replace_rtx (regno_reg_rtx[regno],
                                           reg_equiv[regno].src, insn))