Commit 9940b13c by Ira Rosen Committed by Ira Rosen

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
parent 394473ab
2010-07-05 Ira Rosen <irar@il.ibm.com>
* 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.
2010-07-05 Mikael Pettersson <mikpe@it.uu.se> 2010-07-05 Mikael Pettersson <mikpe@it.uu.se>
PR bootstrap/44820 PR bootstrap/44820
......
2010-07-05 Ira Rosen <irar@il.ibm.com> 2010-07-05 Ira Rosen <irar@il.ibm.com>
* gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c:
Increase loop bound and array size.
* gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c:
Likewise.
2010-07-05 Ira Rosen <irar@il.ibm.com>
* gcc.dg/vect/costmodel/ppc/costmodel-vect-31d.c: Remove. * gcc.dg/vect/costmodel/ppc/costmodel-vect-31d.c: Remove.
* gcc.dg/vect/costmodel/ppc/costmodel-vect-76a.c: Increase loop bound. * gcc.dg/vect/costmodel/ppc/costmodel-vect-76a.c: Increase loop bound.
* gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c: Likewise. * gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c: Likewise.
......
...@@ -13,7 +13,7 @@ interp_pitch(float *exc, float *interp, int pitch, int len) ...@@ -13,7 +13,7 @@ interp_pitch(float *exc, float *interp, int pitch, int len)
for (i=0;i<len;i++) for (i=0;i<len;i++)
{ {
float tmp = 0; float tmp = 0;
for (k=0;k<7;k++) for (k=0;k<12;k++)
{ {
tmp += exc[i-pitch+k+maxj-6]; tmp += exc[i-pitch+k+maxj-6];
} }
...@@ -23,7 +23,7 @@ interp_pitch(float *exc, float *interp, int pitch, int len) ...@@ -23,7 +23,7 @@ interp_pitch(float *exc, float *interp, int pitch, int len)
int main() int main()
{ {
float *exc = calloc(126,sizeof(float)); float *exc = calloc(136,sizeof(float));
float *interp = calloc(80,sizeof(float)); float *interp = calloc(80,sizeof(float));
int pitch = -35; int pitch = -35;
......
...@@ -13,7 +13,7 @@ interp_pitch(float *exc, float *interp, int pitch, int len) ...@@ -13,7 +13,7 @@ interp_pitch(float *exc, float *interp, int pitch, int len)
for (i=0;i<len;i++) for (i=0;i<len;i++)
{ {
float tmp = 0; float tmp = 0;
for (k=0;k<7;k++) for (k=0;k<12;k++)
{ {
tmp += exc[i-pitch+k+maxj-6]; tmp += exc[i-pitch+k+maxj-6];
} }
...@@ -23,7 +23,7 @@ interp_pitch(float *exc, float *interp, int pitch, int len) ...@@ -23,7 +23,7 @@ interp_pitch(float *exc, float *interp, int pitch, int len)
int main() int main()
{ {
float *exc = calloc(126,sizeof(float)); float *exc = calloc(136,sizeof(float));
float *interp = calloc(80,sizeof(float)); float *interp = calloc(80,sizeof(float));
int pitch = -35; int pitch = -35;
......
...@@ -2046,10 +2046,18 @@ vect_get_single_scalar_iteraion_cost (loop_vec_info loop_vinfo) ...@@ -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)) for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
{ {
gimple stmt = gsi_stmt (si); gimple stmt = gsi_stmt (si);
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
if (!is_gimple_assign (stmt) && !is_gimple_call (stmt)) if (!is_gimple_assign (stmt) && !is_gimple_call (stmt))
continue; 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 (STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt)))
{ {
if (DR_IS_READ (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_reference *dr, int ncopies, ...@@ -826,7 +826,7 @@ vect_get_load_cost (struct data_reference *dr, int ncopies,
{ {
case dr_aligned: 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)) if (vect_print_dump_info (REPORT_COST))
fprintf (vect_dump, "vect_model_load_cost: aligned."); fprintf (vect_dump, "vect_model_load_cost: aligned.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment