From: Richard Sandiford Date: Mon, 21 Oct 2019 06:41:15 +0000 (+0000) Subject: Pass a vec_info to supportable_narrowing_operation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db8374a63fd0ea84f72ac76cc899be44df36df6a;p=gcc.git Pass a vec_info to supportable_narrowing_operation 2019-10-21 Richard Sandiford 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f29cdda223f..d5b25ce9464 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-10-21 Richard Sandiford + + * 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 * tree-vect-stmts.c (simple_integer_narrowing): Take a vec_info. diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 55651ebd8e6..92c31ab93a3 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -3175,7 +3175,7 @@ vectorizable_bswap (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, *CONVERT_CODE. */ 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) { if (!INTEGRAL_TYPE_P (TREE_TYPE (vectype_out)) @@ -3185,8 +3185,8 @@ simple_integer_narrowing (vec_info *, tree vectype_out, tree vectype_in, tree_code code; int multi_step_cvt = 0; auto_vec interm_types; - if (!supportable_narrowing_operation (NOP_EXPR, vectype_out, vectype_in, - &code, &multi_step_cvt, + if (!supportable_narrowing_operation (vinfo, NOP_EXPR, vectype_out, + vectype_in, &code, &multi_step_cvt, &interm_types) || multi_step_cvt) return false; @@ -4957,8 +4957,8 @@ vectorizable_conversion (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, case NARROW: gcc_assert (op_type == unary_op); - if (supportable_narrowing_operation (code, vectype_out, vectype_in, - &code1, &multi_step_cvt, + if (supportable_narrowing_operation (vinfo, code, vectype_out, + vectype_in, &code1, &multi_step_cvt, &interm_types)) break; @@ -4974,8 +4974,8 @@ vectorizable_conversion (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, if (!supportable_convert_operation (code, cvt_type, vectype_in, &decl1, &codecvt1)) goto unsupported; - if (supportable_narrowing_operation (NOP_EXPR, vectype_out, cvt_type, - &code1, &multi_step_cvt, + if (supportable_narrowing_operation (vinfo, NOP_EXPR, vectype_out, + cvt_type, &code1, &multi_step_cvt, &interm_types)) break; goto unsupported; @@ -11649,7 +11649,7 @@ supportable_widening_operation (enum tree_code code, stmt_vec_info stmt_info, narrowing operation (short in the above example). */ bool -supportable_narrowing_operation (enum tree_code code, +supportable_narrowing_operation (vec_info *, enum tree_code code, tree vectype_out, tree vectype_in, enum tree_code *code1, int *multi_step_cvt, vec *interm_types) diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index e363d27eee5..71b1da5b1ee 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1603,8 +1603,8 @@ extern bool supportable_widening_operation (enum tree_code, stmt_vec_info, tree, tree, enum tree_code *, enum tree_code *, int *, vec *); -extern bool supportable_narrowing_operation (enum tree_code, tree, tree, - enum tree_code *, +extern bool supportable_narrowing_operation (vec_info *, enum tree_code, tree, + tree, enum tree_code *, int *, vec *); extern unsigned record_stmt_cost (stmt_vector_for_cost *, int, enum vect_cost_for_stmt, stmt_vec_info,