The following patch fixes a x86 bootstrap failure with different sets of options (-with-arch=corei7 -with-cpu=intel, -with-arch=core2 -with-cpu=slm).

  The patch was bootstrapped on x86 (with the 2 sets) and x86-64.

  Committed as rev. 217624.

2014-11-15  Vladimir Makarov  <vmaka...@redhat.com>

        * lra-remat.c (cand_transf_func): Process regno for
        rematerialization too.
        * lra.c (lra): Switch on rematerialization pass.
Index: lra.c
===================================================================
--- lra.c       (revision 217609)
+++ lra.c       (working copy)
@@ -2354,7 +2354,7 @@ lra (FILE *f)
        break;
       /* Now we know what pseudos should be spilled.  Try to
         rematerialize them first.  */
-      if (0&&lra_remat ())
+      if (lra_remat ())
        {
          /* We need full live info -- see the comment above.  */
          lra_create_live_ranges (lra_reg_spill_p, true);
Index: lra-remat.c
===================================================================
--- lra-remat.c (revision 217602)
+++ lra-remat.c (working copy)
@@ -860,6 +860,10 @@ cand_trans_fun (int bb_index, bitmap bb_
            bitmap_set_bit (&temp_bitmap, cid);
            break;
          }
+      /* Check regno for rematerialization.  */
+      if (bitmap_bit_p (bb_changed_regs, cand->regno)
+         || bitmap_bit_p (bb_dead_regs, cand->regno))
+       bitmap_set_bit (&temp_bitmap, cid);
     }
   return bitmap_ior_and_compl (bb_out,
                               &bb_info->gen_cands, bb_in, &temp_bitmap);

Reply via email to