http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59311

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.0

--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> ---
This patch:

diff --git a/gcc/lra-spills.c b/gcc/lra-spills.c
index 4ab10c2..f4dcbdd 100644
--- a/gcc/lra-spills.c
+++ b/gcc/lra-spills.c
@@ -477,9 +477,23 @@ spill_pseudos (void)
       FOR_BB_INSNS (bb, insn)
     if (bitmap_bit_p (&changed_insns, INSN_UID (insn)))
       {
+        rtx *link_loc, link;
         remove_pseudos (&PATTERN (insn), insn);
         if (CALL_P (insn))
           remove_pseudos (&CALL_INSN_FUNCTION_USAGE (insn), insn);
+        for (link_loc = &REG_NOTES (insn);
+         (link = *link_loc) != NULL_RTX;
+         link_loc = &XEXP (link, 1))
+          {
+        switch (REG_NOTE_KIND (link))
+          {
+          case REG_CFA_SET_VDRAP:
+            remove_pseudos (&XEXP (link, 0), insn);
+            break;
+          default:
+            break;
+          }
+          }
         if (lra_dump_file != NULL)
           fprintf (lra_dump_file,
                "Changing spilled pseudos to memory in insn #%u\n",

fixes the testcase.  Should it also handle other REG_NOTES?

Reply via email to