* tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
of VECTOR_MODE_P check.
* tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
element vector types.
Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r251538
+2017-08-30 Jon Beniston <jon@beniston.com>
+ Richard Biener <rguenther@suse.de>
+
+ * tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
+ of VECTOR_MODE_P check.
+ * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
+ element vector types.
+
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
* df.h (df_read_modify_subreg_p): Remove in favor of...
loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
if (VECTOR_BOOLEAN_TYPE_P (type_in)
- || VECTOR_MODE_P (TYPE_MODE (type_in)))
+ || VECTOR_TYPE_P (type_in))
{
/* No need to check target support (already checked by the pattern
recognition function). */
else
simd_mode = mode_for_vector (inner_mode, size / nbytes);
nunits = GET_MODE_SIZE (simd_mode) / nbytes;
- if (nunits <= 1)
+ /* NOTE: nunits == 1 is allowed to support single element vector types. */
+ if (nunits < 1)
return NULL_TREE;
vectype = build_vector_type (scalar_type, nunits);