]> gcc.gnu.org Git - gcc.git/commitdiff
Pass a vec_info to supportable_narrowing_operation
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 21 Oct 2019 06:41:15 +0000 (06:41 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 21 Oct 2019 06:41:15 +0000 (06:41 +0000)
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

gcc/ChangeLog
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.h

index f29cdda223f4df1bd9f736585a949c433f6466d0..d5b25ce94647c828798e64717323d4ccd9830f0a 100644 (file)
@@ -1,3 +1,10 @@
+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.
index 55651ebd8e6a94b1ad6ebf016f126e34fa2aebd9..92c31ab93a327e22c872e8a49f10f87cdc064dad 100644 (file)
@@ -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 <tree, 8> 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<tree> *interm_types)
index e363d27eee5acf436056b1ec55ac140c38e73865..71b1da5b1eeab38b41dbd651766353bd7d933ea9 100644 (file)
@@ -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<tree> *);
-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<tree> *);
 extern unsigned record_stmt_cost (stmt_vector_for_cost *, int,
                                  enum vect_cost_for_stmt, stmt_vec_info,
This page took 0.100518 seconds and 5 git commands to generate.