public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3801] gcc: fix PR rtl-optimization/107482
@ 2022-11-08  9:30 Max Filippov
  0 siblings, 0 replies; only message in thread
From: Max Filippov @ 2022-11-08  9:30 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e581490f0cfa80c58d2b648d71a44a597fbe3008

commit r13-3801-ge581490f0cfa80c58d2b648d71a44a597fbe3008
Author: Max Filippov <jcmvbkbc@gmail.com>
Date:   Mon Nov 7 13:58:49 2022 -0800

    gcc: fix PR rtl-optimization/107482
    
    gcc/
            PR rtl-optimization/107482
            * ira-color.cc (assign_hard_reg): Only call
            update_costs_from_copies when retry_p is false.

Diff:
---
 gcc/ira-color.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/ira-color.cc b/gcc/ira-color.cc
index 4a1a325e8e3..ffe73b61c45 100644
--- a/gcc/ira-color.cc
+++ b/gcc/ira-color.cc
@@ -2209,8 +2209,8 @@ assign_hard_reg (ira_allocno_t a, bool retry_p)
     restore_costs_from_copies (a);
   ALLOCNO_HARD_REGNO (a) = best_hard_regno;
   ALLOCNO_ASSIGNED_P (a) = true;
-  if (best_hard_regno >= 0)
-    update_costs_from_copies (a, true, ! retry_p);
+  if (best_hard_regno >= 0 && !retry_p)
+    update_costs_from_copies (a, true, true);
   ira_assert (ALLOCNO_CLASS (a) == aclass);
   /* We don't need updated costs anymore.  */
   ira_free_allocno_updated_costs (a);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-08  9:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-08  9:30 [gcc r13-3801] gcc: fix PR rtl-optimization/107482 Max Filippov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).