+2014-10-26 Richard Sandiford <richard.sandiford@arm.com>
+
+ * config/mep/mep.c (mep_mul_hilo_bypass_1): Delete.
+ (mep_mul_hilo_bypass_p): Use FOR_EACH_SUBRTX.
+
2014-10-26 Richard Sandiford <richard.sandiford@arm.com>
* config/mep/mep.c (mep_store_find_set): Take a const_rtx and
return INSN_P (insn) ? mep_store_data_bypass_1 (prev, PATTERN (insn)) : false;
}
-/* A for_each_rtx subroutine of mep_mul_hilo_bypass_p. Return 1 if *X
- is a register other than LO or HI and if PREV sets *X. */
-
-static int
-mep_mul_hilo_bypass_1 (rtx *x, void *prev)
-{
- return (REG_P (*x)
- && REGNO (*x) != LO_REGNO
- && REGNO (*x) != HI_REGNO
- && reg_set_p (*x, (const_rtx) prev));
-}
-
/* Return true if, apart from HI/LO, there are no true dependencies
between multiplication instructions PREV and INSN. */
pat = PATTERN (insn);
if (GET_CODE (pat) == PARALLEL)
pat = XVECEXP (pat, 0, 0);
- return (GET_CODE (pat) == SET
- && !for_each_rtx (&SET_SRC (pat), mep_mul_hilo_bypass_1, prev));
+ if (GET_CODE (pat) != SET)
+ return false;
+ subrtx_iterator::array_type array;
+ FOR_EACH_SUBRTX (iter, array, SET_SRC (pat), NONCONST)
+ {
+ const_rtx x = *iter;
+ if (REG_P (x)
+ && REGNO (x) != LO_REGNO
+ && REGNO (x) != HI_REGNO
+ && reg_set_p (x, prev))
+ return false;
+ }
+ return true;
}
/* Return true if INSN is an ldc instruction that issues to the