Commit 71df5a7e by Bernd Schmidt Committed by Bernd Schmidt

re PR rtl-optimization/44404 (auto-inc-dec generates an invalid assembly instruction)

	PR rtl-optimization/44404
	* auto-inc-dec.c (find_inc): Avoid calling count_occurrences if
	possible, use reg_overlap_mentioned_p instead.

From-SVN: r161920
parent f625098e
2010-07-07 Bernd Schmidt <bernds@codesourcery.com>
PR rtl-optimization/44404
* auto-inc-dec.c (find_inc): Avoid calling count_occurrences if
possible, use reg_overlap_mentioned_p instead.
2010-07-07 Duncan Sands <baldrick@free.fr> 2010-07-07 Duncan Sands <baldrick@free.fr>
PR middle-end/41355 PR middle-end/41355
......
...@@ -1068,14 +1068,7 @@ find_inc (bool first_try) ...@@ -1068,14 +1068,7 @@ find_inc (bool first_try)
/* For the post_add to work, the result_reg of the inc must not be /* For the post_add to work, the result_reg of the inc must not be
used in the mem insn since this will become the new index used in the mem insn since this will become the new index
register. */ register. */
if (count_occurrences (PATTERN (mem_insn.insn), inc_insn.reg_res, 1) == 0 if (reg_overlap_mentioned_p (inc_insn.reg_res, PATTERN (mem_insn.insn)))
&& reg_overlap_mentioned_p (inc_insn.reg_res, PATTERN (mem_insn.insn)))
{
debug_rtx (mem_insn.insn);
debug_rtx (inc_insn.reg_res);
gcc_unreachable ();
}
if (count_occurrences (PATTERN (mem_insn.insn), inc_insn.reg_res, 1) != 0)
{ {
if (dump_file) if (dump_file)
fprintf (dump_file, "base reg replacement failure.\n"); fprintf (dump_file, "base reg replacement failure.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment