From 2b099144ddcff64e3ed12b91d51e79906e59d188 Mon Sep 17 00:00:00 2001 From: bstarynk Date: Wed, 22 Feb 2012 09:02:39 +0000 Subject: 2012-02-22 Basile Starynkevitch MELT branch merged with trunk rev 184458 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@184460 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-vect-stmts.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gcc/tree-vect-stmts.c') diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 20f10f37437..78dd4d1615e 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -3753,7 +3753,9 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, if (!STMT_VINFO_DATA_REF (stmt_info)) return false; - if (tree_int_cst_compare (DR_STEP (dr), size_zero_node) < 0) + if (tree_int_cst_compare (loop && nested_in_vect_loop_p (loop, stmt) + ? STMT_VINFO_DR_STEP (stmt_info) : DR_STEP (dr), + size_zero_node) < 0) { if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "negative step for store."); @@ -4266,7 +4268,10 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, if (!STMT_VINFO_DATA_REF (stmt_info)) return false; - negative = tree_int_cst_compare (DR_STEP (dr), size_zero_node) < 0; + negative = tree_int_cst_compare (nested_in_vect_loop + ? STMT_VINFO_DR_STEP (stmt_info) + : DR_STEP (dr), + size_zero_node) < 0; if (negative && ncopies > 1) { if (vect_print_dump_info (REPORT_DETAILS)) @@ -4653,8 +4658,8 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, This can only occur when vectorizing memory accesses in the inner-loop nested within an outer-loop that is being vectorized. */ - if (loop && nested_in_vect_loop_p (loop, stmt) - && (TREE_INT_CST_LOW (DR_STEP (dr)) + if (nested_in_vect_loop + && (TREE_INT_CST_LOW (STMT_VINFO_DR_STEP (stmt_info)) % GET_MODE_SIZE (TYPE_MODE (vectype)) != 0)) { gcc_assert (alignment_support_scheme != dr_explicit_realign_optimized); -- cgit v1.2.1