i386.c (ix86_builtin_vectorization_cost): Adjust vec_construct cost.
authorRichard Biener <rguenther@suse.de>
Fri, 15 Jul 2016 07:38:01 +0000 (07:38 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 15 Jul 2016 07:38:01 +0000 (07:38 +0000)
2016-07-15  Richard Biener  <rguenther@suse.de>

* config/i386/i386.c (ix86_builtin_vectorization_cost): Adjust
vec_construct cost.

From-SVN: r238364

gcc/ChangeLog
gcc/config/i386/i386.c

index 8da237861a182eb0c0eca1580f7bd09f9c15c887..624d4d63b8f2f8af256d480922c161eea051c9e5 100644 (file)
@@ -1,3 +1,8 @@
+2016-07-15  Richard Biener  <rguenther@suse.de>
+
+       * config/i386/i386.c (ix86_builtin_vectorization_cost): Adjust
+       vec_construct cost.
+
 2016-07-14  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/71872
index d190bef52999dfbc6b39cfa41d8208689479abb7..ba35dce799e35fe5a26a662f7e165b7ab213eee8 100644 (file)
@@ -49770,8 +49770,6 @@ static int
 ix86_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
                                  tree vectype, int)
 {
-  unsigned elements;
-
   switch (type_of_cost)
     {
       case scalar_stmt:
@@ -49813,8 +49811,7 @@ ix86_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
         return ix86_cost->vec_stmt_cost;
 
       case vec_construct:
-       elements = TYPE_VECTOR_SUBPARTS (vectype);
-       return ix86_cost->vec_stmt_cost * (elements / 2 + 1);
+       return ix86_cost->vec_stmt_cost * (TYPE_VECTOR_SUBPARTS (vectype) - 1);
 
       default:
         gcc_unreachable ();