aboutsummaryrefslogtreecommitdiff
path: root/gcc/auto-inc-dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/auto-inc-dec.c')
-rw-r--r--gcc/auto-inc-dec.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/auto-inc-dec.c b/gcc/auto-inc-dec.c
index 94dffc95eb2..04c91a246a8 100644
--- a/gcc/auto-inc-dec.c
+++ b/gcc/auto-inc-dec.c
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "output.h"
#include "function.h"
#include "except.h"
+#include "diagnostic-core.h"
#include "toplev.h"
#include "recog.h"
#include "expr.h"
@@ -1068,14 +1069,7 @@ find_inc (bool first_try)
/* 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
register. */
- if (count_occurrences (PATTERN (mem_insn.insn), inc_insn.reg_res, 1) == 0
- && 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 (reg_overlap_mentioned_p (inc_insn.reg_res, PATTERN (mem_insn.insn)))
{
if (dump_file)
fprintf (dump_file, "base reg replacement failure.\n");