===================================================================
---
testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c
(revision 161819)
+++
testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c
(working copy)
@@ -13,7 +13,7 @@ interp_pitch(float *exc, float *interp,
for (i=0;i<len;i++)
{
float tmp = 0;
- for (k=0;k<7;k++)
+ for (k=0;k<12;k++)
{
tmp += exc[i-pitch+k+maxj-6];
}
===================================================================
@@ -2046,10 +2046,18 @@ vect_get_single_scalar_iteraion_cost (lo
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))))
===================================================================
@@ -826,7 +826,7 @@ vect_get_load_cost (struct data_referenc
{
case dr_aligned:
{
- inside_cost += ncopies * vect_get_stmt_cost (vector_load);
+ *inside_cost += ncopies * vect_get_stmt_cost (vector_load);
if (vect_print_dump_info (REPORT_COST))
fprintf (vect_dump, "vect_model_load_cost: aligned.");