This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix PR22372

Ira Rosen wrote on 10/18/06 05:04:

--- tree-vect-transform.c       (revision 117455)
+++ tree-vect-transform.c       (working copy)
@@ -50,11 +50,11 @@ static bool vect_transform_stmt (tree, b
 static void vect_align_data_ref (tree);
 static tree vect_create_destination_var (tree, tree);
 static tree vect_create_data_ref_ptr
-  (tree, block_stmt_iterator *, tree, tree *, bool);
+  (tree, block_stmt_iterator *, tree, tree *, bool, tree);
 static tree vect_create_addr_base_for_vector_ref (tree, tree *, tree);
 static tree vect_get_new_vect_var (tree, enum vect_var_kind, const char
 static tree vect_get_vec_def_for_operand (tree, tree, tree *);
-static tree vect_init_vector (tree, tree);
+static tree vect_init_vector (tree, tree, tree);
 static void vect_finish_stmt_generation
   (tree stmt, tree vec_stmt, block_stmt_iterator *bsi);
 static bool vect_is_simple_cond (tree, loop_vec_info);
Since we are back in stage 1, could you remove all the forward declarations for static functions? As a separate patch, because you'll be forced to also re-arrange the function bodies and that makes for a fairly big patch.

   /* Arguments are ready. create the new vector stmt.  */
-  *vec_stmt = build2 (MODIFY_EXPR, vectype, data_ref, vec_oprnd1);
+  *vec_stmt = build2 (MODIFY_EXPR, TREE_TYPE (vec_oprnd1), data_ref,
+                      vec_oprnd1);
   vect_finish_stmt_generation (stmt, *vec_stmt, bsi);

Use void_type_node for assignment statements.

@@ -1916,10 +1929,12 @@ vectorizable_load (tree stmt, block_stmt
          /* Create permutation mask, if required, in loop preheader.  */
          tree builtin_decl;
          params = build_tree_list (NULL_TREE, init_addr);
-         vec_dest = vect_create_destination_var (scalar_dest, vectype);
          builtin_decl = targetm.vectorize.builtin_mask_for_load ();
          new_stmt = build_function_call_expr (builtin_decl, params);
-         new_stmt = build2 (MODIFY_EXPR, vectype, vec_dest, new_stmt);
+         vec_dest = vect_create_destination_var (scalar_dest,
+                                                 TREE_TYPE (new_stmt));
+         new_stmt = build2 (MODIFY_EXPR, TREE_TYPE (vec_dest), vec_dest,
+                            new_stmt);

The rest looks fine.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]