summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-data-refs.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-07-08 10:51:46 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-07-08 10:51:46 +0000
commit20ede5c64d71cb0fb25a445f93752c7e6e861dba (patch)
tree4b2f3b444ba0daa29aed751a241ee827c39679dd /gcc/tree-vect-data-refs.c
parent80edb36cfdf779f56fb5a5c001df4dfecaeb25b2 (diff)
downloadgcc-20ede5c64d71cb0fb25a445f93752c7e6e861dba.tar.gz
re PR tree-optimization/44861 (internal compiler error: in vectorizable_load, at tree-vect-stmts.c:3812)
2010-07-08 Richard Guenther <rguenther@suse.de> PR tree-optimization/44861 * tree-vect-stmts.c (vectorizable_store): Preserve TBAA information when building MEM_REFs. (vectorizable_load): Likewise. * tree-vect-data-refs.c (vect_setup_realignment): Likewise. * g++.dg/vect/pr44861.cc: New testcase. From-SVN: r161949
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r--gcc/tree-vect-data-refs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index b8908aafa14..efd95a78acb 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -3466,6 +3466,7 @@ vect_setup_realignment (gimple stmt, gimple_stmt_iterator *gsi,
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
tree vectype = STMT_VINFO_VECTYPE (stmt_info);
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
+ struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
edge pe;
tree scalar_dest = gimple_assign_lhs (stmt);
@@ -3574,7 +3575,9 @@ vect_setup_realignment (gimple stmt, gimple_stmt_iterator *gsi,
gimple_assign_set_lhs (new_stmt, new_temp);
new_bb = gsi_insert_on_edge_immediate (pe, new_stmt);
gcc_assert (!new_bb);
- data_ref = build_simple_mem_ref (new_temp);
+ data_ref
+ = build2 (MEM_REF, TREE_TYPE (vec_dest), new_temp,
+ build_int_cst (reference_alias_ptr_type (DR_REF (dr)), 0));
new_stmt = gimple_build_assign (vec_dest, data_ref);
new_temp = make_ssa_name (vec_dest, new_stmt);
gimple_assign_set_lhs (new_stmt, new_temp);