aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-slp.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-01-15 11:49:43 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-01-15 11:49:43 +0000
commit89483f9984c057366bca7f24920fa91637f1efdb (patch)
treec43194c1663e6cd9382734668ba65f849539ab3b /gcc/tree-vect-slp.c
parent94619ed95ba0a31df9f9ec6532e6c8f4bcdbefaf (diff)
downloadgcc-89483f9984c057366bca7f24920fa91637f1efdb.zip
gcc-89483f9984c057366bca7f24920fa91637f1efdb.tar.gz
gcc-89483f9984c057366bca7f24920fa91637f1efdb.tar.bz2
re PR tree-optimization/68961 (Test case gcc.target/powerpc/pr60203.c fails since r231674)
2016-01-15 Richard Biener <rguenther@suse.de> PR tree-optimization/68961 * tree-vect-slp.c (vect_analyze_slp_cost_1): Consider cost of invariants in stores again. * gcc.dg/vect/costmodel/x86_64/costmodel-pr68961.c: New testcase. From-SVN: r232415
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r--gcc/tree-vect-slp.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 161655a..fe422f8 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1453,18 +1453,20 @@ vect_analyze_slp_cost_1 (slp_instance instance, slp_tree node,
/* Record the cost for the vector loads. */
vect_model_load_cost (stmt_info, ncopies_for_cost, false,
node, prologue_cost_vec, body_cost_vec);
+ return;
}
- return;
}
-
- record_stmt_cost (body_cost_vec, ncopies_for_cost, vector_stmt,
- stmt_info, 0, vect_body);
- if (SLP_TREE_TWO_OPERATORS (node))
+ else
{
record_stmt_cost (body_cost_vec, ncopies_for_cost, vector_stmt,
stmt_info, 0, vect_body);
- record_stmt_cost (body_cost_vec, ncopies_for_cost, vec_perm,
- stmt_info, 0, vect_body);
+ if (SLP_TREE_TWO_OPERATORS (node))
+ {
+ record_stmt_cost (body_cost_vec, ncopies_for_cost, vector_stmt,
+ stmt_info, 0, vect_body);
+ record_stmt_cost (body_cost_vec, ncopies_for_cost, vec_perm,
+ stmt_info, 0, vect_body);
+ }
}
/* Push SLP node def-type to stmts. */