+2019-08-15 Richard Sandiford <richard.sandiford@arm.com>
+
+ * config/aarch64/aarch64-protos.h (aarch64_sve_mode_p): Declare.
+ * config/aarch64/aarch64.c (aarch64_sve_mode_p): New function.
+ (aarch64_select_early_remat_modes): Use it.
+
2019-08-15 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/aarch64.c (aarch64_simd_vector_alignment): Return
bool aarch64_zero_extend_const_eq (machine_mode, rtx, machine_mode, rtx);
bool aarch64_move_imm (HOST_WIDE_INT, machine_mode);
opt_machine_mode aarch64_sve_pred_mode (unsigned int);
+bool aarch64_sve_mode_p (machine_mode);
bool aarch64_sve_cnt_immediate_p (rtx);
bool aarch64_sve_scalar_inc_dec_immediate_p (rtx);
bool aarch64_sve_addvl_addpl_immediate_p (rtx);
return aarch64_classify_vector_mode (mode) & VEC_ANY_DATA;
}
+/* Return true if MODE is any form of SVE mode, including predicates,
+ vectors and structures. */
+bool
+aarch64_sve_mode_p (machine_mode mode)
+{
+ return aarch64_classify_vector_mode (mode) & VEC_ANY_SVE;
+}
+
/* Return true if MODE is an SVE data vector mode; either a single vector
or a structure of vectors. */
static bool
/* SVE values are not normally live across a call, so it should be
worth doing early rematerialization even in VL-specific mode. */
for (int i = 0; i < NUM_MACHINE_MODES; ++i)
- {
- machine_mode mode = (machine_mode) i;
- unsigned int vec_flags = aarch64_classify_vector_mode (mode);
- if (vec_flags & VEC_ANY_SVE)
- bitmap_set_bit (modes, i);
- }
+ if (aarch64_sve_mode_p ((machine_mode) i))
+ bitmap_set_bit (modes, i);
}
/* Override the default target speculation_safe_value. */