Commit 4c8fd8ac by Jon Beniston Committed by Jon Beniston

tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead of VECTOR_MODE_P check.

	* 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
parent 33845ca9
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> 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
* df.h (df_read_modify_subreg_p): Remove in favor of... * df.h (df_read_modify_subreg_p): Remove in favor of...
......
...@@ -4152,7 +4152,7 @@ vect_pattern_recog_1 (vect_recog_func *recog_func, ...@@ -4152,7 +4152,7 @@ vect_pattern_recog_1 (vect_recog_func *recog_func,
loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info); loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
if (VECTOR_BOOLEAN_TYPE_P (type_in) 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 /* No need to check target support (already checked by the pattern
recognition function). */ recognition function). */
......
...@@ -9101,7 +9101,8 @@ get_vectype_for_scalar_type_and_size (tree scalar_type, unsigned size) ...@@ -9101,7 +9101,8 @@ get_vectype_for_scalar_type_and_size (tree scalar_type, unsigned size)
else else
simd_mode = mode_for_vector (inner_mode, size / nbytes); simd_mode = mode_for_vector (inner_mode, size / nbytes);
nunits = GET_MODE_SIZE (simd_mode) / 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; return NULL_TREE;
vectype = build_vector_type (scalar_type, nunits); vectype = build_vector_type (scalar_type, nunits);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment