Hi Richard, Hi Paulo, Following Paulo's suggestion, here is a patch to remove the calls to df_analyze from the compare-elimination pass, and to use df_get_live_[in/out]. I can confirm that with this patch applied PR 49801 is fixed.
OK to apply ? For mainline and the 4.6 branch ? Cheers Nick gcc/ChangeLog 2011-10-07 Nick Clifton <ni...@redhat.com> PR middle-end/49801 * compare-elim.c (find_comparisons_in_bb): Use df_get_live_in and df_get_live_out instead of accessing the bitmaps directly. (execute_compare_elim_after_reload): Remove calls to df_set_flags, df_live_add_problem and df_analyze. Index: gcc/compare-elim.c =================================================================== --- gcc/compare-elim.c (revision 179647) +++ gcc/compare-elim.c (working copy) @@ -356,7 +356,7 @@ /* Look to see if the flags register is live outgoing here, and incoming to any successor not part of the extended basic block. */ - if (bitmap_bit_p (&DF_LIVE_BB_INFO (bb)->out, targetm.flags_regnum)) + if (bitmap_bit_p (df_get_live_out (bb), targetm.flags_regnum)) { edge e; edge_iterator ei; @@ -364,7 +364,7 @@ FOR_EACH_EDGE (e, ei, bb->succs) { basic_block dest = e->dest; - if (bitmap_bit_p (&DF_LIVE_BB_INFO (dest)->in, + if (bitmap_bit_p (df_get_live_in (bb), targetm.flags_regnum) && !single_pred_p (dest)) { @@ -580,10 +580,6 @@ static unsigned int execute_compare_elim_after_reload (void) { - df_set_flags (DF_DEFER_INSN_RESCAN); - df_live_add_problem (); - df_analyze (); - gcc_checking_assert (all_compares == NULL); /* Locate all comparisons and their uses, and eliminate duplicates. */ @@ -602,8 +598,6 @@ VEC_free (comparison_struct_p, heap, all_compares); all_compares = NULL; - - df_analyze (); } return 0;