re PR rtl-optimization/87727 (gcc.target/sparc/overflow-2.c FAILs)
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 21 Dec 2018 16:09:23 +0000 (16:09 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 21 Dec 2018 16:09:23 +0000 (16:09 +0000)
PR rtl-optimization/87727
* combine.c (cant_combine_insn_p): On a LEAF_REGISTERS target, combine
again moves from leaf hard registers.

* final.c (final_scan_insn_1) <NOTE_INSN_INLINE_ENTRY>: Minor tweak.

From-SVN: r267328

gcc/ChangeLog
gcc/combine.c
gcc/final.c

index 0fc3225ee2f246c18ac2f8dd44fd7aadde24e967..98a8f472b7d594813a50fd2cd7961efae8bf1dc1 100644 (file)
@@ -1,3 +1,11 @@
+2018-12-21  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR rtl-optimization/87727
+       * combine.c (cant_combine_insn_p): On a LEAF_REGISTERS target, combine
+       again moves from leaf hard registers.
+
+       * final.c (final_scan_insn_1) <NOTE_INSN_INLINE_ENTRY>: Minor tweak.
+
 2018-12-21  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/88522
index a1d6e2dfc99920f647e7fc93719ae50938e1b49a..6f1a335a25d1f8932179623d9b60b53868ec40d9 100644 (file)
@@ -2353,7 +2353,12 @@ cant_combine_insn_p (rtx_insn *insn)
     dest = SUBREG_REG (dest);
   if (REG_P (src) && REG_P (dest)
       && ((HARD_REGISTER_P (src)
-          && ! TEST_HARD_REG_BIT (fixed_reg_set, REGNO (src)))
+          && ! TEST_HARD_REG_BIT (fixed_reg_set, REGNO (src))
+#ifdef LEAF_REGISTERS
+          && ! LEAF_REGISTERS [REGNO (src)])
+#else
+          )
+#endif
          || (HARD_REGISTER_P (dest)
              && ! TEST_HARD_REG_BIT (fixed_reg_set, REGNO (dest))
              && targetm.class_likely_spilled_p (REGNO_REG_CLASS (REGNO (dest))))))
index 423318129dd41cca8425ddc8e406e5d495baa84f..a2993f0f2cda4e0eec12a6f906d6270495c9d5d2 100644 (file)
@@ -2430,10 +2430,9 @@ final_scan_insn_1 (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
 
        case NOTE_INSN_INLINE_ENTRY:
          gcc_checking_assert (cfun->debug_nonbind_markers);
-         if (!DECL_IGNORED_P (current_function_decl))
+         if (!DECL_IGNORED_P (current_function_decl)
+             && notice_source_line (insn, NULL))
            {
-             if (!notice_source_line (insn, NULL))
-               break;
              (*debug_hooks->inline_entry) (LOCATION_BLOCK
                                            (NOTE_MARKER_LOCATION (insn)));
              goto output_source_line;