Commit e088c552 by Dorit Naishlos Committed by Dorit Nuzman

re PR tree-optimization/18403 (FAILs to vectorize testcases on ppc64-linux)

        PR tree-opt/18403
        PR tree-opt/18505
        * tree-vectorizer.c (vect_create_data_ref_ptr): Use
        lang_hooks.types.type_for_size instead of integer_type_node for the
        type of ptr_update.

From-SVN: r91081
parent 00aca6e8
2004-11-23 Dorit Naishlos <dorit@il.ibm.com>
PR tree-opt/18403
PR tree-opt/18505
* tree-vectorizer.c (vect_create_data_ref_ptr): Use
lang_hooks.types.type_for_size instead of integer_type_node for the
type of ptr_update.
2004-11-23 Ralf Corsepius <ralf.corsepius@rtems.org>
* config.gcc (h8300-*-rtems*): Use h8300/t-rtems.
......
......@@ -1866,6 +1866,7 @@ vect_create_data_ref_ptr (tree stmt, block_stmt_iterator *bsi, tree offset,
tree vectype_size;
tree ptr_update;
tree data_ref_ptr;
tree type, tmp, size;
base_name = unshare_expr (DR_BASE_NAME (dr));
if (vect_debug_details (NULL))
......@@ -1952,11 +1953,20 @@ vect_create_data_ref_ptr (tree stmt, block_stmt_iterator *bsi, tree offset,
idx = vect_create_index_for_vector_ref (loop, bsi);
/* Create: update = idx * vectype_size */
ptr_update = create_tmp_var (integer_type_node, "update");
tmp = create_tmp_var (integer_type_node, "update");
add_referenced_tmp_var (tmp);
size = TYPE_SIZE (vect_ptr_type);
type = lang_hooks.types.type_for_size (tree_low_cst (size, 1), 1);
ptr_update = create_tmp_var (type, "update");
add_referenced_tmp_var (ptr_update);
vectype_size = build_int_cst (integer_type_node,
GET_MODE_SIZE (TYPE_MODE (vectype)));
vec_stmt = build2 (MULT_EXPR, integer_type_node, idx, vectype_size);
vec_stmt = build2 (MODIFY_EXPR, void_type_node, tmp, vec_stmt);
new_temp = make_ssa_name (tmp, vec_stmt);
TREE_OPERAND (vec_stmt, 0) = new_temp;
bsi_insert_before (bsi, vec_stmt, BSI_SAME_STMT);
vec_stmt = fold_convert (type, new_temp);
vec_stmt = build2 (MODIFY_EXPR, void_type_node, ptr_update, vec_stmt);
new_temp = make_ssa_name (ptr_update, vec_stmt);
TREE_OPERAND (vec_stmt, 0) = new_temp;
......
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