re PR middle-end/79521 (Bootstrap failure on i686-linux starting with r245436)
authorJeff Law <law@redhat.com>
Thu, 16 Feb 2017 06:35:29 +0000 (23:35 -0700)
committerJeff Law <law@gcc.gnu.org>
Thu, 16 Feb 2017 06:35:29 +0000 (23:35 -0700)
PR middle-end/79521
* ira-costs.c (scan_one_insn): Check have_regs_of_mode before calling
ira_init_register_move_cost_if_necessary.

From-SVN: r245500

gcc/ChangeLog
gcc/ira-costs.c

index d99f4445d8b222c258e2d49b4e1209087c28ad88..24d9c1589f4567bb71789925f77561cde083ddc5 100644 (file)
@@ -1,3 +1,9 @@
+2017-02-15 Jeff Law  <law@redhat.com>
+
+       PR middle-end/79521
+       * ira-costs.c (scan_one_insn): Check have_regs_of_mode before calling
+       ira_init_register_move_cost_if_necessary.
+
 2017-02-15  Martin Sebor  <msebor@redhat.com>
 
        PR middle-end/32003
index 1737430145611cdae1e2a07ca38f224dfe44599d..9cf0119422553d27d1b0bca9be7ca126d5d03371 100644 (file)
@@ -1452,7 +1452,8 @@ scan_one_insn (rtx_insn *insn)
     {
       rtx x = XEXP (PATTERN (insn), 0);
       if (GET_CODE (x) == REG
-         && REGNO (x) >= FIRST_PSEUDO_REGISTER)
+         && REGNO (x) >= FIRST_PSEUDO_REGISTER
+         && have_regs_of_mode[GET_MODE (x)])
         ira_init_register_move_cost_if_necessary (GET_MODE (x));
       return insn;
     }