}
vect_ptr_type = build_pointer_type (STMT_VINFO_VECTYPE (stmt_info));
- addr_base = fold_convert (vect_ptr_type, addr_base);
dest = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var, base_name);
- addr_base = force_gimple_operand (addr_base, &seq, false, dest);
+ addr_base = force_gimple_operand (addr_base, &seq, true, dest);
gimple_seq_add_seq (new_stmt_list, seq);
if (DR_PTR_INFO (dr)
- && TREE_CODE (addr_base) == SSA_NAME)
+ && TREE_CODE (addr_base) == SSA_NAME
+ && !SSA_NAME_PTR_INFO (addr_base))
{
vect_duplicate_ssa_name_ptr_info (addr_base, dr, stmt_info);
if (offset || byte_offset)
tree aggr_ptr_type;
tree aggr_ptr;
tree new_temp;
- gimple vec_stmt;
gimple_seq new_stmt_list = NULL;
edge pe = NULL;
basic_block new_bb;
}
*initial_address = new_temp;
-
- /* Create: p = (aggr_type *) initial_base */
- if (TREE_CODE (new_temp) != SSA_NAME
- || !useless_type_conversion_p (aggr_ptr_type, TREE_TYPE (new_temp)))
- {
- vec_stmt = gimple_build_assign (aggr_ptr,
- fold_convert (aggr_ptr_type, new_temp));
- aggr_ptr_init = make_ssa_name (aggr_ptr, vec_stmt);
- /* Copy the points-to information if it exists. */
- if (DR_PTR_INFO (dr))
- vect_duplicate_ssa_name_ptr_info (aggr_ptr_init, dr, stmt_info);
- gimple_assign_set_lhs (vec_stmt, aggr_ptr_init);
- if (pe)
- {
- new_bb = gsi_insert_on_edge_immediate (pe, vec_stmt);
- gcc_assert (!new_bb);
- }
- else
- gsi_insert_before (gsi, vec_stmt, GSI_SAME_STMT);
- }
- else
- aggr_ptr_init = new_temp;
+ aggr_ptr_init = new_temp;
/* (3) Handle the updating of the aggregate-pointer inside the loop.
This is needed when ONLY_INIT is false, and also when AT_LOOP is the
if (bump)
update = bump;
- new_dataref_ptr = copy_ssa_name (dataref_ptr);
+ if (TREE_CODE (dataref_ptr) == SSA_NAME)
+ new_dataref_ptr = copy_ssa_name (dataref_ptr);
+ else
+ new_dataref_ptr = make_ssa_name (TREE_TYPE (dataref_ptr));
incr_stmt = gimple_build_assign (new_dataref_ptr, POINTER_PLUS_EXPR,
dataref_ptr, update);
vect_finish_stmt_generation (stmt, incr_stmt, gsi);
vect_permute_store_chain(). */
vec_oprnd = result_chain[i];
- data_ref = build2 (MEM_REF, TREE_TYPE (vec_oprnd), dataref_ptr,
- dataref_offset
- ? dataref_offset
- : build_int_cst (reference_alias_ptr_type
- (DR_REF (first_dr)), 0));
+ data_ref = fold_build2 (MEM_REF, TREE_TYPE (vec_oprnd),
+ dataref_ptr,
+ dataref_offset
+ ? dataref_offset
+ : build_int_cst (reference_alias_ptr_type
+ (DR_REF (first_dr)), 0));
align = TYPE_ALIGN_UNIT (vectype);
if (aligned_access_p (first_dr))
misalign = 0;
TYPE_ALIGN (elem_type));
misalign = DR_MISALIGNMENT (first_dr);
}
- if (dataref_offset == NULL_TREE)
+ if (dataref_offset == NULL_TREE
+ && TREE_CODE (dataref_ptr) == SSA_NAME)
set_ptr_info_alignment (get_ptr_info (dataref_ptr), align,
misalign);
unsigned int align, misalign;
data_ref
- = build2 (MEM_REF, vectype, dataref_ptr,
- dataref_offset
- ? dataref_offset
- : build_int_cst (reference_alias_ptr_type
- (DR_REF (first_dr)), 0));
+ = fold_build2 (MEM_REF, vectype, dataref_ptr,
+ dataref_offset
+ ? dataref_offset
+ : build_int_cst (reference_alias_ptr_type
+ (DR_REF (first_dr)), 0));
align = TYPE_ALIGN_UNIT (vectype);
if (alignment_support_scheme == dr_aligned)
{
TYPE_ALIGN (elem_type));
misalign = DR_MISALIGNMENT (first_dr);
}
- if (dataref_offset == NULL_TREE)
+ if (dataref_offset == NULL_TREE
+ && TREE_CODE (dataref_ptr) == SSA_NAME)
set_ptr_info_alignment (get_ptr_info (dataref_ptr),
align, misalign);
break;
dr_explicit_realign,
dataref_ptr, NULL);
- ptr = copy_ssa_name (dataref_ptr);
+ if (TREE_CODE (dataref_ptr) == SSA_NAME)
+ ptr = copy_ssa_name (dataref_ptr);
+ else
+ ptr = make_ssa_name (TREE_TYPE (dataref_ptr));
new_stmt = gimple_build_assign
(ptr, BIT_AND_EXPR, dataref_ptr,
build_int_cst
build_int_cst
(TREE_TYPE (ptr),
-(HOST_WIDE_INT)TYPE_ALIGN_UNIT (vectype)));
- ptr = copy_ssa_name (dataref_ptr, new_stmt);
+ ptr = copy_ssa_name (ptr, new_stmt);
gimple_assign_set_lhs (new_stmt, ptr);
vect_finish_stmt_generation (stmt, new_stmt, gsi);
data_ref
break;
}
case dr_explicit_realign_optimized:
- new_temp = copy_ssa_name (dataref_ptr);
+ if (TREE_CODE (dataref_ptr) == SSA_NAME)
+ new_temp = copy_ssa_name (dataref_ptr);
+ else
+ new_temp = make_ssa_name (TREE_TYPE (dataref_ptr));
new_stmt = gimple_build_assign
(new_temp, BIT_AND_EXPR, dataref_ptr,
build_int_cst