aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/tree-vect-stmts.c
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2014-10-31 12:00:28 -0700
committerRong Xu <xur@google.com>2014-10-31 12:00:28 -0700
commit29098ff058814235fb39d00b7496b7f8345ed3eb (patch)
treef0aaf66f503399133223096679a60c1217a45391 /gcc-4.9/gcc/tree-vect-stmts.c
parente86367917b8400cc955d8bba75dcc329cb0e75d0 (diff)
downloadtoolchain_gcc-29098ff058814235fb39d00b7496b7f8345ed3eb.tar.gz
toolchain_gcc-29098ff058814235fb39d00b7496b7f8345ed3eb.tar.bz2
toolchain_gcc-29098ff058814235fb39d00b7496b7f8345ed3eb.zip
[4.9] Backport patches fixed vectorization issues.
Backport 3 patches from upstream gcc that fixed some vectorization issues: r215585 fixed PR63341 r216508 fixed PR63563 r216770 fixed PR63530 Change-Id: I650bf25ef0843b1ff01911b567fb26e069fd4550
Diffstat (limited to 'gcc-4.9/gcc/tree-vect-stmts.c')
-rw-r--r--gcc-4.9/gcc/tree-vect-stmts.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc-4.9/gcc/tree-vect-stmts.c b/gcc-4.9/gcc/tree-vect-stmts.c
index b87c14345..d208f2d6b 100644
--- a/gcc-4.9/gcc/tree-vect-stmts.c
+++ b/gcc-4.9/gcc/tree-vect-stmts.c
@@ -5601,6 +5601,7 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
int i, j, group_size, group_gap;
tree msq = NULL_TREE, lsq;
tree offset = NULL_TREE;
+ tree byte_offset = NULL_TREE;
tree realignment_token = NULL_TREE;
gimple phi = NULL;
vec<tree> dr_chain = vNULL;
@@ -6262,7 +6263,8 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
if (alignment_support_scheme == dr_explicit_realign_optimized)
{
phi = SSA_NAME_DEF_STMT (msq);
- offset = size_int (TYPE_VECTOR_SUBPARTS (vectype) - 1);
+ byte_offset = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (vectype),
+ size_one_node);
}
}
else
@@ -6303,7 +6305,8 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
dataref_ptr
= vect_create_data_ref_ptr (first_stmt, aggr_type, at_loop,
offset, &dummy, gsi, &ptr_incr,
- simd_lane_access_p, &inv_p);
+ simd_lane_access_p, &inv_p,
+ byte_offset);
}
else if (dataref_offset)
dataref_offset = int_const_binop (PLUS_EXPR, dataref_offset,