+2010-06-03 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/44403
+ * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref):
+ Preserve pointer qualifiers.
+ (vect_create_data_ref_ptr): Likewise.
+
2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
PR c++/44294
tree vect_ptr_type;
tree step = TYPE_SIZE_UNIT (TREE_TYPE (DR_REF (dr)));
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ tree base;
if (loop_vinfo && loop && loop != (gimple_bb (stmt))->loop_father)
{
}
vect_ptr_type = build_pointer_type (STMT_VINFO_VECTYPE (stmt_info));
+ base = get_base_address (DR_REF (dr));
+ if (base
+ && INDIRECT_REF_P (base))
+ vect_ptr_type
+ = build_qualified_type (vect_ptr_type,
+ TYPE_QUALS (TREE_TYPE (TREE_OPERAND (base, 0))));
vec_stmt = fold_convert (vect_ptr_type, addr_base);
addr_expr = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
tree step;
bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info);
gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
+ tree base;
if (loop_vinfo)
{
/** (1) Create the new vector-pointer variable: **/
vect_ptr_type = build_pointer_type (vectype);
+ base = get_base_address (DR_REF (dr));
+ if (base
+ && INDIRECT_REF_P (base))
+ vect_ptr_type
+ = build_qualified_type (vect_ptr_type,
+ TYPE_QUALS (TREE_TYPE (TREE_OPERAND (base, 0))));
vect_ptr = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
get_name (base_name));