OSDN Git Service

2009-05-22 Vladimir Makarov <vmakarov@redhat.com>
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 May 2009 19:00:45 +0000 (19:00 +0000)
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 May 2009 19:00:45 +0000 (19:00 +0000)
PR target/39856
* reg-stack.c (subst_stack_regs_pat): Remove gcc_assert for note
for clobber.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147804 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/reg-stack.c

index 514f3c4..4577802 100644 (file)
@@ -1,3 +1,9 @@
+2009-05-22 Vladimir Makarov <vmakarov@redhat.com>
+
+       PR target/39856
+       * reg-stack.c (subst_stack_regs_pat): Remove gcc_assert for note
+       for clobber.
+
 2009-05-22  Mark Mitchell  <mark@codesourcery.com>
 
        * tree.c (handle_dll_attribute): Mark dllexport'd inlines as
index c1fc820..2f94958 100644 (file)
@@ -1371,21 +1371,23 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat)
 
            if (pat != PATTERN (insn))
              {
-               /* The fix_truncdi_1 pattern wants to be able to allocate
-                  its own scratch register.  It does this by clobbering
-                  an fp reg so that it is assured of an empty reg-stack
-                  register.  If the register is live, kill it now.
-                  Remove the DEAD/UNUSED note so we don't try to kill it
-                  later too.  */
+               /* The fix_truncdi_1 pattern wants to be able to
+                  allocate its own scratch register.  It does this by
+                  clobbering an fp reg so that it is assured of an
+                  empty reg-stack register.  If the register is live,
+                  kill it now.  Remove the DEAD/UNUSED note so we
+                  don't try to kill it later too.
+
+                  In reality the UNUSED note can be absent in some
+                  complicated cases when the register is reused for
+                  partially set variable.  */
 
                if (note)
                  emit_pop_insn (insn, regstack, *dest, EMIT_BEFORE);
                else
-                 {
-                   note = find_reg_note (insn, REG_UNUSED, *dest);
-                   gcc_assert (note);
-                 }
-               remove_note (insn, note);
+                 note = find_reg_note (insn, REG_UNUSED, *dest);
+               if (note)
+                 remove_note (insn, note);
                replace_reg (dest, FIRST_STACK_REG + 1);
              }
            else