From: Vladimir N. Makarov Date: Fri, 28 Feb 2020 16:27:30 +0000 (-0500) Subject: One more patch for PR93564: Prefer smaller hard regno when we do not honor reg alloc... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f3ce088645e5305d932380c7520809181b2d2eb9;p=gcc.git One more patch for PR93564: Prefer smaller hard regno when we do not honor reg alloc order. 2020-02-28 Vladimir Makarov PR rtl-optimization/93564 * ira-color.c (assign_hard_reg): Prefer smaller hard regno when we do not honor reg alloc order. --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f6a9ae2375e..1451807f7d9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2020-02-28 Vladimir Makarov + + PR rtl-optimization/93564 + * ira-color.c (assign_hard_reg): Prefer smaller hard regno when we + do not honor reg alloc order. + 2020-02-27 Joel Hutton PR target/87612 diff --git a/gcc/ira-color.c b/gcc/ira-color.c index 0ffdd192020..a2bf108c38e 100644 --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -1925,7 +1925,9 @@ assign_hard_reg (ira_allocno_t a, bool retry_p) } if (min_cost > cost) min_cost = cost; - if (min_full_cost > full_cost) + if (min_full_cost > full_cost + || (!HONOR_REG_ALLOC_ORDER && min_full_cost == full_cost + && best_hard_regno > hard_regno)) { min_full_cost = full_cost; best_hard_regno = hard_regno;