re PR rtl-optimization/89865 (FAIL: gcc.target/i386/pr49095.c scan-assembler-times...
authorVladimir Makarov <vmakarov@redhat.com>
Mon, 1 Apr 2019 16:18:30 +0000 (16:18 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Mon, 1 Apr 2019 16:18:30 +0000 (16:18 +0000)
2019-04-01  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/89865
* ira-costs.c (process_bb_node_for_hard_reg_moves): Skip hard
register if it is a part of small class.

From-SVN: r270060

gcc/ChangeLog
gcc/ira-costs.c

index 2f55f595f3f2ff32ad0fb52d9f17f5d85597e90d..5016bd26c2136d2f3413be1479046c54b6d79251 100644 (file)
@@ -1,3 +1,9 @@
+2019-04-01  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR rtl-optimization/89865
+       * ira-costs.c (process_bb_node_for_hard_reg_moves): Skip hard
+       register if it is a part of small class.
+
 2019-04-01  Andrey Belevantsev  <abel@ispras.ru>
 
        PR rtl-optimization/87273
index a17dae3302cd61a441705a895542c04ffccc0eee..c7feaba371838ddac64e2cf2d34b0fa9658add6e 100644 (file)
@@ -2107,6 +2107,13 @@ process_bb_node_for_hard_reg_moves (ira_loop_tree_node_t loop_tree_node)
        }
       else
        continue;
+      if (reg_class_size[(int) REGNO_REG_CLASS (hard_regno)]
+         == (ira_reg_class_max_nregs
+             [REGNO_REG_CLASS (hard_regno)][(int) ALLOCNO_MODE(a)]))
+       /* If the class can provide only one hard reg to the allocno,
+          we processed the insn record_operand_costs already and we
+          actually updated the hard reg cost there.  */
+       continue;
       rclass = ALLOCNO_CLASS (a);
       if (! TEST_HARD_REG_BIT (reg_class_contents[rclass], hard_regno))
        continue;