aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-05-14 15:01:22 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-05-14 15:01:22 +0000
commita82960aa3f53932913e9f026cf817f48c5845f9e (patch)
tree9aa4a5b963dd59f3951fd6abdc29e564d2dd64a5
parentf2bc201f53e2b8b9b9d072b41c5099ee825686f4 (diff)
downloadgcc-a82960aa3f53932913e9f026cf817f48c5845f9e.zip
gcc-a82960aa3f53932913e9f026cf817f48c5845f9e.tar.gz
gcc-a82960aa3f53932913e9f026cf817f48c5845f9e.tar.bz2
re PR bootstrap/53331 (AIX bootstrap failure in tree-vect-data-ref compiling matmul_i4)
2012-05-14 Richard Guenther <rguenther@suse.de> PR tree-optimization/53331 * tree-vect-data-refs.c (vect_verify_datarefs_alignment): Ignore strided loads. * tree-vect-stmts.c (vect_model_load_cost): Handle strided loads. From-SVN: r187466
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-vect-data-refs.c5
-rw-r--r--gcc/tree-vect-stmts.c17
3 files changed, 25 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9933288..bb20e58 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2012-05-14 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53331
+ * tree-vect-data-refs.c (vect_verify_datarefs_alignment): Ignore
+ strided loads.
+ * tree-vect-stmts.c (vect_model_load_cost): Handle strided loads.
+
2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 53063
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index e536321..1a87d1e 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -1078,6 +1078,11 @@ vect_verify_datarefs_alignment (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo)
|| !STMT_VINFO_VECTORIZABLE (stmt_info))
continue;
+ /* Strided loads perform only component accesses, alignment is
+ irrelevant for them. */
+ if (STMT_VINFO_STRIDE_LOAD_P (stmt_info))
+ continue;
+
supportable_dr_alignment = vect_supportable_dr_alignment (dr, false);
if (!supportable_dr_alignment)
{
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 88204fe..bdb6828 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -1032,10 +1032,19 @@ vect_model_load_cost (stmt_vec_info stmt_info, int ncopies, bool load_lanes_p,
}
/* The loads themselves. */
- vect_get_load_cost (first_dr, ncopies,
- ((!STMT_VINFO_GROUPED_ACCESS (stmt_info)) || group_size > 1
- || slp_node),
- &inside_cost, &outside_cost);
+ if (STMT_VINFO_STRIDE_LOAD_P (stmt_info))
+ {
+ /* N scalar loads plus gathering them into a vector.
+ ??? scalar_to_vec isn't the cost for that. */
+ inside_cost += (vect_get_stmt_cost (scalar_load) * ncopies
+ * TYPE_VECTOR_SUBPARTS (STMT_VINFO_VECTYPE (stmt_info)));
+ inside_cost += ncopies * vect_get_stmt_cost (scalar_to_vec);
+ }
+ else
+ vect_get_load_cost (first_dr, ncopies,
+ ((!STMT_VINFO_GROUPED_ACCESS (stmt_info))
+ || group_size > 1 || slp_node),
+ &inside_cost, &outside_cost);
if (vect_print_dump_info (REPORT_COST))
fprintf (vect_dump, "vect_model_load_cost: inside_cost = %d, "