Avoid removing sets of a pseudo PIC register in LRA.
authorBernd Schmidt <bernds@redhat.com>
Mon, 15 Feb 2016 12:06:44 +0000 (12:06 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Mon, 15 Feb 2016 12:06:44 +0000 (12:06 +0000)
PR rtl-optimization/69648
* lra-constraints.c (update_ebb_live_info): Don't remove sets of
pic_offset_table_rtx.

From-SVN: r233424

gcc/ChangeLog
gcc/lra-constraints.c

index a50c2075759e01355b5f6275529a4479ae00248f..61118d222bac8ef2b251d6b26d6df954c3c17771 100644 (file)
@@ -1,5 +1,9 @@
 2016-02-15  Bernd Schmidt  <bschmidt@redhat.com>
 
+       PR rtl-optimization/69648
+       * lra-constraints.c (update_ebb_live_info): Don't remove sets of
+       pic_offset_table_rtx.
+
        PR rtl-optimization/69752
        * ira.c (update_equiv_regs): When looking for more than a single SET,
        also take other side effects into account.
index 17b58bdfc3d1b9ad8e72d7591dcfaab5f37e57da..f33f8c54876cd0454983bb7cb2d26cf4683dbc81 100644 (file)
@@ -5178,8 +5178,10 @@ update_ebb_live_info (rtx_insn *head, rtx_insn *tail)
       curr_id = lra_get_insn_recog_data (curr_insn);
       curr_static_id = curr_id->insn_static_data;
       remove_p = false;
-      if ((set = single_set (curr_insn)) != NULL_RTX && REG_P (SET_DEST (set))
+      if ((set = single_set (curr_insn)) != NULL_RTX
+         && REG_P (SET_DEST (set))
          && (regno = REGNO (SET_DEST (set))) >= FIRST_PSEUDO_REGISTER
+         && SET_DEST (set) != pic_offset_table_rtx
          && bitmap_bit_p (&check_only_regs, regno)
          && ! bitmap_bit_p (&live_regs, regno))
        remove_p = true;