Index: gcc/config/mep/mep.c
===================================================================
--- gcc/config/mep/mep.c	(revision 189193)
+++ gcc/config/mep/mep.c	(working copy)
@@ -5022,7 +5022,7 @@
        done = 1;
        for (insn = insns; insn; insn = next)
  	{
-	  next = NEXT_INSN (insn);
+	  next = next_nonnote_nondebug_insn (insn);
  	  if (GET_CODE (insn) != INSN)
  	    continue;
  	  pat = PATTERN (insn);
@@ -5035,7 +5035,7 @@
  	      && find_regno_note (insn, REG_DEAD, REGNO (SET_SRC (pat)))
  	      && mep_compatible_reg_class (REGNO (SET_SRC (pat)), REGNO 
(SET_DEST (pat))))
  	    {
-	      follow = next_nonnote_insn (insn);
+	      follow = next_nonnote_nondebug_insn (insn);
  	      if (dump_file)
  		fprintf (dump_file, "superfluous moves: considering %d\n", INSN_UID 
