aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-06-10 11:45:39 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-06-10 11:45:39 +0000
commitfcea0bbbacd4f2ef7007338b3ec6edf72e9ba6a7 (patch)
tree3edba0a86e1b60fba30cb38a5fa65ea1cc7a7d2d
parent921b13d09390034dea6d11ee47471efcca865ba6 (diff)
downloadgcc-fcea0bbbacd4f2ef7007338b3ec6edf72e9ba6a7.zip
gcc-fcea0bbbacd4f2ef7007338b3ec6edf72e9ba6a7.tar.gz
gcc-fcea0bbbacd4f2ef7007338b3ec6edf72e9ba6a7.tar.bz2
targhooks.c (default_builtin_vectorization_cost): Adjust vec_construct cost.
2016-06-10 Richard Biener <rguenther@suse.de> * targhooks.c (default_builtin_vectorization_cost): Adjust vec_construct cost. From-SVN: r237302
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/targhooks.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5038f75..580dbed 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2016-06-10 Richard Biener <rguenther@suse.de>
+ * targhooks.c (default_builtin_vectorization_cost): Adjust
+ vec_construct cost.
+
+2016-06-10 Richard Biener <rguenther@suse.de>
+
* gimple-fold.c (gimple_fold_builtin_memory_op): Make sure
to fold the RHS to a constant if possible.
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 95980f5..3e089e7 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -564,8 +564,6 @@ default_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
tree vectype,
int misalign ATTRIBUTE_UNUSED)
{
- unsigned elements;
-
switch (type_of_cost)
{
case scalar_stmt:
@@ -589,8 +587,7 @@ default_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
return 3;
case vec_construct:
- elements = TYPE_VECTOR_SUBPARTS (vectype);
- return elements / 2 + 1;
+ return TYPE_VECTOR_SUBPARTS (vectype) - 1;
default:
gcc_unreachable ();