From: Richard Biener Date: Wed, 9 Dec 2015 08:23:37 +0000 (+0000) Subject: tree-vect-stmts.c (vectorizable_load): Set new vinfo only if it was not yet set. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34cd48e5d56b95f149e1c7e294f522bd3c93c94f;p=gcc.git tree-vect-stmts.c (vectorizable_load): Set new vinfo only if it was not yet set. 2015-12-09 Richard Biener * tree-vect-stmts.c (vectorizable_load): Set new vinfo only if it was not yet set. * tree-vectorizer.h (set_vinfo_for_stmt): Assert we don't overwrite an existing entry. From-SVN: r231443 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a4c3e651f3..7fcec750d07 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-12-09 Richard Biener + + * tree-vect-stmts.c (vectorizable_load): Set new vinfo only + if it was not yet set. + * tree-vectorizer.h (set_vinfo_for_stmt): Assert we don't + overwrite an existing entry. + 2015-12-09 Chung-Lin Tang * c-family/c-omp.c (c_finish_oacc_wait): Remove add_stmt() call. diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 9f116528b47..1a65c03753d 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -7276,6 +7276,9 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt, unshare_expr (gimple_assign_rhs1 (stmt)))); new_temp = vect_init_vector (stmt, tem, vectype, NULL); + new_stmt = SSA_NAME_DEF_STMT (new_temp); + set_vinfo_for_stmt (new_stmt, + new_stmt_vec_info (new_stmt, vinfo)); } else { @@ -7283,10 +7286,8 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt, gsi_next (&gsi2); new_temp = vect_init_vector (stmt, scalar_dest, vectype, &gsi2); + new_stmt = SSA_NAME_DEF_STMT (new_temp); } - new_stmt = SSA_NAME_DEF_STMT (new_temp); - set_vinfo_for_stmt (new_stmt, - new_stmt_vec_info (new_stmt, vinfo)); } if (negative) diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 327f08d79ed..b07f2700098 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -715,7 +715,10 @@ set_vinfo_for_stmt (gimple *stmt, stmt_vec_info info) stmt_vec_info_vec.safe_push (info); } else - stmt_vec_info_vec[uid - 1] = info; + { + gcc_checking_assert (info == NULL); + stmt_vec_info_vec[uid - 1] = info; + } } /* Return the earlier statement between STMT1 and STMT2. */