From dd9bf787d35f3d9a511e1b7c1d46e058631bb771 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 21 Dec 2018 16:09:23 +0000 Subject: [PATCH] re PR rtl-optimization/87727 (gcc.target/sparc/overflow-2.c FAILs) 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) : Minor tweak. From-SVN: r267328 --- gcc/ChangeLog | 8 ++++++++ gcc/combine.c | 7 ++++++- gcc/final.c | 5 ++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0fc3225ee2f..98a8f472b7d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2018-12-21 Eric Botcazou + + 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) : Minor tweak. + 2018-12-21 Jakub Jelinek PR target/88522 diff --git a/gcc/combine.c b/gcc/combine.c index a1d6e2dfc99..6f1a335a25d 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -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)))))) diff --git a/gcc/final.c b/gcc/final.c index 423318129dd..a2993f0f2cd 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -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; -- 2.30.2