Commit fcd0566b by Richard Biener Committed by Richard Biener

tree-vect-stmts.c (vect_is_simple_cond): When vectype is not specified still…

tree-vect-stmts.c (vect_is_simple_cond): When vectype is not specified still compute a comp_vectype for invariant compares.

2019-05-07  Richard Biener  <rguenther@suse.de>

	* tree-vect-stmts.c (vect_is_simple_cond): When vectype is
	not specified still compute a comp_vectype for invariant
	compares.

From-SVN: r270945
parent 530ec1ac
2019-05-07 Richard Biener <rguenther@suse.de> 2019-05-07 Richard Biener <rguenther@suse.de>
* tree-vect-stmts.c (vect_is_simple_cond): When vectype is
not specified still compute a comp_vectype for invariant
compares.
2019-05-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/90316 PR tree-optimization/90316
* tree-ssa-pre.c (translate_vuse_through_block): When * tree-ssa-pre.c (translate_vuse_through_block): When
same_valid is NULL do not bother to search for a virtual same_valid is NULL do not bother to search for a virtual
......
...@@ -8864,11 +8864,12 @@ vect_is_simple_cond (tree cond, vec_info *vinfo, ...@@ -8864,11 +8864,12 @@ vect_is_simple_cond (tree cond, vec_info *vinfo,
*comp_vectype = vectype1 ? vectype1 : vectype2; *comp_vectype = vectype1 ? vectype1 : vectype2;
/* Invariant comparison. */ /* Invariant comparison. */
if (! *comp_vectype && vectype) if (! *comp_vectype)
{ {
tree scalar_type = TREE_TYPE (lhs); tree scalar_type = TREE_TYPE (lhs);
/* If we can widen the comparison to match vectype do so. */ /* If we can widen the comparison to match vectype do so. */
if (INTEGRAL_TYPE_P (scalar_type) if (INTEGRAL_TYPE_P (scalar_type)
&& vectype
&& tree_int_cst_lt (TYPE_SIZE (scalar_type), && tree_int_cst_lt (TYPE_SIZE (scalar_type),
TYPE_SIZE (TREE_TYPE (vectype)))) TYPE_SIZE (TREE_TYPE (vectype))))
scalar_type = build_nonstandard_integer_type scalar_type = build_nonstandard_integer_type
......
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