]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[RA]: Fixing i686 bootstrap failure because of pushing the equivalence patch
authorVladimir N. Makarov <vmakarov@redhat.com>
Fri, 27 Oct 2023 18:50:40 +0000 (14:50 -0400)
committerVladimir N. Makarov <vmakarov@redhat.com>
Fri, 27 Oct 2023 19:12:29 +0000 (15:12 -0400)
GCC with my recent patch improving cost calculation for pseudos with
equivalence may generate different code with and without debug info
and as the result i686 bootstrap fails on i686.  The patch fixes this
bug.

gcc/ChangeLog:

PR rtl-optimization/112107
* ira-costs.cc: (calculate_equiv_gains): Use NONDEBUG_INSN_P
instead of INSN_P.

gcc/ira-costs.cc

index c40868070765d191ec7b9cfbe0da285a47ac8ce1..50f80779025766432a8187788382e43ffd48c51a 100644 (file)
@@ -1871,7 +1871,8 @@ calculate_equiv_gains (void)
        = ira_bb_nodes[bb->index].parent->regno_allocno_map;
       FOR_BB_INSNS (bb, insn)
        {
-         if (!INSN_P (insn) || !get_equiv_regno (PATTERN (insn), regno, subreg)
+         if (!NONDEBUG_INSN_P (insn)
+             || !get_equiv_regno (PATTERN (insn), regno, subreg)
              || !bitmap_bit_p (&equiv_pseudos, regno))
            continue;
          rtx subst = ira_reg_equiv[regno].memory;