vec_perm cost to 1 for non-Power7 VSX architectures
authorKewen Lin <linkw@gcc.gnu.org>
Sun, 29 Sep 2019 09:18:22 +0000 (09:18 +0000)
committerKewen Lin <linkw@gcc.gnu.org>
Sun, 29 Sep 2019 09:18:22 +0000 (09:18 +0000)
gcc/ChangeLog

2019-09-29  Kewen Lin  <linkw@gcc.gnu.org>

    * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Lower
    vec_perm cost to 1 for non-Power7 VSX architectures.

From-SVN: r276267

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 9714e98df9fd7214d01eaeda4d7de0eb1e8206c6..2c7a847e327f02266d1a69d88de3e3bbf5cc062c 100644 (file)
@@ -1,3 +1,8 @@
+2019-09-29  Kewen Lin  <linkw@gcc.gnu.org>
+
+       * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Lower
+       vec_perm cost to 1 for non-Power7 VSX architectures.
+
 2019-09-29  Kewen Lin  <linkw@gcc.gnu.org>
 
        * config/rs6000/vsx.md (vec_pack[su]_float_v2di): New define_expand.
index f136dcbf8c3fff1869764cfc05e2195cd17a5dca..a34415349e6594e4cfaeb99e21eb59c619698d73 100644 (file)
@@ -4774,7 +4774,8 @@ rs6000_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
         return 1;
 
       case vec_perm:
-       if (TARGET_VSX)
+       /* Power7 has only one permute unit, make it a bit expensive.  */
+       if (TARGET_VSX && rs6000_tune == PROCESSOR_POWER7)
          return 3;
        else
          return 1;