[backport proposed 4.8 fix for PR54128, which affects gcc-4.6 and newer ] From: "Steve Ellcey " Date: Fri, 31 Aug 2012 10:58:51 -0700 Subject: [Patch, PR 54128] ira.c change to fix mips bootstrap List-Archive: Here is my patch to fix the bootstrap comparision failure (PR 54128) on MIPS. The reason for the comparision failure was a difference in register usage and I tracked it down to build_insn_chain which checked all instructions for register usage in order to set the dead_or_set and live_relevant_regs bitmaps instead of checking only non-debug instructions. Changing INSN_P to NONDEBUG_INSN_P in build_insn_chain allowed me to bootstrap and caused no regressions. OK to checkin? Steve Ellcey sellcey@mips.com 2012-08-31 Steve Ellcey PR bootstrap/54128 * ira.c (build_insn_chain): Check only NONDEBUG instructions for register usage. --- gcc-4.6.3/gcc/ira.c.~1~ 2011-03-08 16:51:12.000000000 +0100 +++ gcc-4.6.3/gcc/ira.c 2012-09-01 13:58:12.000000000 +0200 @@ -2840,7 +2840,7 @@ build_insn_chain (void) c->insn = insn; c->block = bb->index; - if (INSN_P (insn)) + if (NONDEBUG_INSN_P (insn)) for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++) { df_ref def = *def_rec; @@ -2931,7 +2931,7 @@ build_insn_chain (void) bitmap_and_compl_into (live_relevant_regs, elim_regset); bitmap_copy (&c->live_throughout, live_relevant_regs); - if (INSN_P (insn)) + if (NONDEBUG_INSN_P (insn)) for (use_rec = DF_INSN_UID_USES (uid); *use_rec; use_rec++) { df_ref use = *use_rec;