Commit db8374a6 by Richard Sandiford Committed by Richard Sandiford

Pass a vec_info to supportable_narrowing_operation

2019-10-21  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vectorizer.h (supportable_narrowing_operation): Take a vec_info.
	* tree-vect-stmts.c (supportable_narrowing_operation): Likewise.
	(simple_integer_narrowing): Update call accordingly.
	(vectorizable_conversion): Likewise.

From-SVN: r277231
parent 6c261c66
2019-10-21 Richard Sandiford <richard.sandiford@arm.com> 2019-10-21 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (supportable_narrowing_operation): Take a vec_info.
* tree-vect-stmts.c (supportable_narrowing_operation): Likewise.
(simple_integer_narrowing): Update call accordingly.
(vectorizable_conversion): Likewise.
2019-10-21 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-stmts.c (simple_integer_narrowing): Take a vec_info. * tree-vect-stmts.c (simple_integer_narrowing): Take a vec_info.
(vectorizable_call): Update call accordingly. (vectorizable_call): Update call accordingly.
......
...@@ -3175,7 +3175,7 @@ vectorizable_bswap (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, ...@@ -3175,7 +3175,7 @@ vectorizable_bswap (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi,
*CONVERT_CODE. */ *CONVERT_CODE. */
static bool static bool
simple_integer_narrowing (vec_info *, tree vectype_out, tree vectype_in, simple_integer_narrowing (vec_info *vinfo, tree vectype_out, tree vectype_in,
tree_code *convert_code) tree_code *convert_code)
{ {
if (!INTEGRAL_TYPE_P (TREE_TYPE (vectype_out)) if (!INTEGRAL_TYPE_P (TREE_TYPE (vectype_out))
...@@ -3185,8 +3185,8 @@ simple_integer_narrowing (vec_info *, tree vectype_out, tree vectype_in, ...@@ -3185,8 +3185,8 @@ simple_integer_narrowing (vec_info *, tree vectype_out, tree vectype_in,
tree_code code; tree_code code;
int multi_step_cvt = 0; int multi_step_cvt = 0;
auto_vec <tree, 8> interm_types; auto_vec <tree, 8> interm_types;
if (!supportable_narrowing_operation (NOP_EXPR, vectype_out, vectype_in, if (!supportable_narrowing_operation (vinfo, NOP_EXPR, vectype_out,
&code, &multi_step_cvt, vectype_in, &code, &multi_step_cvt,
&interm_types) &interm_types)
|| multi_step_cvt) || multi_step_cvt)
return false; return false;
...@@ -4957,8 +4957,8 @@ vectorizable_conversion (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, ...@@ -4957,8 +4957,8 @@ vectorizable_conversion (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi,
case NARROW: case NARROW:
gcc_assert (op_type == unary_op); gcc_assert (op_type == unary_op);
if (supportable_narrowing_operation (code, vectype_out, vectype_in, if (supportable_narrowing_operation (vinfo, code, vectype_out,
&code1, &multi_step_cvt, vectype_in, &code1, &multi_step_cvt,
&interm_types)) &interm_types))
break; break;
...@@ -4974,8 +4974,8 @@ vectorizable_conversion (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, ...@@ -4974,8 +4974,8 @@ vectorizable_conversion (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi,
if (!supportable_convert_operation (code, cvt_type, vectype_in, if (!supportable_convert_operation (code, cvt_type, vectype_in,
&decl1, &codecvt1)) &decl1, &codecvt1))
goto unsupported; goto unsupported;
if (supportable_narrowing_operation (NOP_EXPR, vectype_out, cvt_type, if (supportable_narrowing_operation (vinfo, NOP_EXPR, vectype_out,
&code1, &multi_step_cvt, cvt_type, &code1, &multi_step_cvt,
&interm_types)) &interm_types))
break; break;
goto unsupported; goto unsupported;
...@@ -11649,7 +11649,7 @@ supportable_widening_operation (enum tree_code code, stmt_vec_info stmt_info, ...@@ -11649,7 +11649,7 @@ supportable_widening_operation (enum tree_code code, stmt_vec_info stmt_info,
narrowing operation (short in the above example). */ narrowing operation (short in the above example). */
bool bool
supportable_narrowing_operation (enum tree_code code, supportable_narrowing_operation (vec_info *, enum tree_code code,
tree vectype_out, tree vectype_in, tree vectype_out, tree vectype_in,
enum tree_code *code1, int *multi_step_cvt, enum tree_code *code1, int *multi_step_cvt,
vec<tree> *interm_types) vec<tree> *interm_types)
......
...@@ -1603,8 +1603,8 @@ extern bool supportable_widening_operation (enum tree_code, stmt_vec_info, ...@@ -1603,8 +1603,8 @@ extern bool supportable_widening_operation (enum tree_code, stmt_vec_info,
tree, tree, enum tree_code *, tree, tree, enum tree_code *,
enum tree_code *, int *, enum tree_code *, int *,
vec<tree> *); vec<tree> *);
extern bool supportable_narrowing_operation (enum tree_code, tree, tree, extern bool supportable_narrowing_operation (vec_info *, enum tree_code, tree,
enum tree_code *, tree, enum tree_code *,
int *, vec<tree> *); int *, vec<tree> *);
extern unsigned record_stmt_cost (stmt_vector_for_cost *, int, extern unsigned record_stmt_cost (stmt_vector_for_cost *, int,
enum vect_cost_for_stmt, stmt_vec_info, enum vect_cost_for_stmt, stmt_vec_info,
......
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