aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorIra Rosen <irar@il.ibm.com>2010-07-05 10:41:25 +0000
committerIra Rosen <irar@gcc.gnu.org>2010-07-05 10:41:25 +0000
commit9940b13ce7376801a0d05d409424cd851d363dc0 (patch)
treed734a85fd429090835af28ab289244738137244a /gcc/tree-vect-loop.c
parent394473ab8eb9ed62f0379ec4e3182314f16a93fc (diff)
downloadgcc-9940b13ce7376801a0d05d409424cd851d363dc0.zip
gcc-9940b13ce7376801a0d05d409424cd851d363dc0.tar.gz
gcc-9940b13ce7376801a0d05d409424cd851d363dc0.tar.bz2
tree-vect-loop.c (vect_get_single_scalar_iteraion_cost): Skip statements that are not vectorized.
* tree-vect-loop.c (vect_get_single_scalar_iteraion_cost): Skip statements that are not vectorized. * tree-vect-stmts.c (vect_get_load_cost): Update the value stored in INSIDE_COST. From-SVN: r161827
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 1285528..22b23a6 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -2046,10 +2046,18 @@ vect_get_single_scalar_iteraion_cost (loop_vec_info loop_vinfo)
for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
{
gimple stmt = gsi_stmt (si);
+ stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
if (!is_gimple_assign (stmt) && !is_gimple_call (stmt))
continue;
+ /* Skip stmts that are not vectorized inside the loop. */
+ if (stmt_info
+ && !STMT_VINFO_RELEVANT_P (stmt_info)
+ && (!STMT_VINFO_LIVE_P (stmt_info)
+ || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def))
+ continue;
+
if (STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt)))
{
if (DR_IS_READ (STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt))))