targhooks.c (default_builtin_vectorization_cost): Adjust vec_construct cost.
authorRichard Biener <rguenther@suse.de>
Fri, 10 Jun 2016 11:45:39 +0000 (11:45 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 10 Jun 2016 11:45:39 +0000 (11:45 +0000)
2016-06-10  Richard Biener  <rguenther@suse.de>

* targhooks.c (default_builtin_vectorization_cost): Adjust
vec_construct cost.

From-SVN: r237302

gcc/ChangeLog
gcc/targhooks.c

index 5038f751ae3465997399a53fe83ab51decd8305e..580dbed12c34d446c061a01d3a30a9b72c4069d4 100644 (file)
@@ -1,3 +1,8 @@
+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
index 95980f547bd9acf2dbbbc47c91ed5b6d2385cacc..3e089e759ce9414eb3ed44aa855b38d9fb17ba07 100644 (file)
@@ -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 ();