+2017-12-28 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * emit-rtl.c (gen_const_vec_series): Use valid_for_const_vector_p
+ instead of CONSTANT_P.
+ (gen_vec_series): Likewise.
+ * simplify-rtx.c (simplify_binary_operation_1): Likewise.
+
2017-12-28 Andreas Schwab <schwab@linux-m68k.org>
* config/m68k/m68k.md (ashrdi3_const1, lshrdi3_const1): Add
rtx
gen_const_vec_series (machine_mode mode, rtx base, rtx step)
{
- gcc_assert (CONSTANT_P (base) && CONSTANT_P (step));
+ gcc_assert (valid_for_const_vector_p (mode, base)
+ && valid_for_const_vector_p (mode, step));
int nunits = GET_MODE_NUNITS (mode);
rtvec v = rtvec_alloc (nunits);
{
if (step == const0_rtx)
return gen_vec_duplicate (mode, base);
- if (CONSTANT_P (base) && CONSTANT_P (step))
+ if (valid_for_const_vector_p (mode, base)
+ && valid_for_const_vector_p (mode, step))
return gen_const_vec_series (mode, base, step);
return gen_rtx_VEC_SERIES (mode, base, step);
}
case VEC_SERIES:
if (op1 == CONST0_RTX (GET_MODE_INNER (mode)))
return gen_vec_duplicate (mode, op0);
- if (CONSTANT_P (op0) && CONSTANT_P (op1))
+ if (valid_for_const_vector_p (mode, op0)
+ && valid_for_const_vector_p (mode, op1))
return gen_const_vec_series (mode, op0, op1);
return 0;