From 2c2d5d00f8f01da6610d23517c53adca824796e5 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 15 Feb 2017 23:35:29 -0700 Subject: [PATCH] re PR middle-end/79521 (Bootstrap failure on i686-linux starting with r245436) 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 | 6 ++++++ gcc/ira-costs.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d99f4445d8b..24d9c1589f4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-02-15 Jeff Law + + 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 PR middle-end/32003 diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c index 17374301456..9cf01194225 100644 --- a/gcc/ira-costs.c +++ b/gcc/ira-costs.c @@ -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; } -- 2.30.2