Commit 61021c35 by Richard Biener Committed by Richard Biener

tree-vect-slp.c (vect_get_and_check_slp_defs): Handle VIEW_CONVERT_EXPR.

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

	* tree-vect-slp.c (vect_get_and_check_slp_defs): Handle
	VIEW_CONVERT_EXPR.
	(vect_build_slp_tree_1): Likewise.

From-SVN: r271126
parent 40289199
2019-05-13 Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_get_and_check_slp_defs): Handle
VIEW_CONVERT_EXPR.
(vect_build_slp_tree_1): Likewise.
2019-05-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/90402
* tree-if-conv.c (tree_if_conversion): Value number only
the loop body by making the latch an exit of the region
......
......@@ -333,7 +333,7 @@ vect_get_and_check_slp_defs (vec_info *vinfo, unsigned char *swap,
number_of_oprnds = gimple_num_ops (stmt) - 1;
/* Swap can only be done for cond_expr if asked to, otherwise we
could result in different comparison code to the first stmt. */
if (gimple_assign_rhs_code (stmt) == COND_EXPR
if (code == COND_EXPR
&& COMPARISON_CLASS_P (gimple_assign_rhs1 (stmt)))
{
first_op_cond = true;
......@@ -364,6 +364,8 @@ again:
}
else
oprnd = gimple_op (stmt_info->stmt, first_op_idx + (swapped ? !i : i));
if (TREE_CODE (oprnd) == VIEW_CONVERT_EXPR)
oprnd = TREE_OPERAND (oprnd, 0);
oprnd_info = (*oprnds_info)[i];
......@@ -907,6 +909,7 @@ vect_build_slp_tree_1 (unsigned char *swap,
&& TREE_CODE_CLASS (rhs_code) != tcc_unary
&& TREE_CODE_CLASS (rhs_code) != tcc_expression
&& TREE_CODE_CLASS (rhs_code) != tcc_comparison
&& rhs_code != VIEW_CONVERT_EXPR
&& rhs_code != CALL_EXPR)
{
if (dump_enabled_p ())
......
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