Hi,

In https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00924.html, I raised the
vectorization cost for a vec_construct operation that requires direct
moves between GPRs and VSRs.  The cost equation I substituted has since
proven to be slightly more conservative than attended, and we're seeing
some cases of SLP vectorization being avoided that should not be.  This
patch adjusts the equation to reduce the cost somewhat.

I've tested this to ensure the cases previously seen are now being
vectorized again, and done some benchmark testing that shows no measurable
result, positive or negative.  So this is just minor fine-tuning, but
still important to get right.

Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no regressions.
Is this ok for trunk?

Thanks,
Bill


2017-07-21  Bill Schmidt  <wschm...@linux.vnet.ibm.com>

        PR target/80695
        * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
        Reduce cost estimate for direct moves.


Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c  (revision 250426)
+++ gcc/config/rs6000/rs6000.c  (working copy)
@@ -5757,7 +5757,7 @@ rs6000_builtin_vectorization_cost (enum vect_cost_
            if (TARGET_P9_VECTOR)
              return TYPE_VECTOR_SUBPARTS (vectype) - 1 + 2;
            else
-             return TYPE_VECTOR_SUBPARTS (vectype) - 1 + 11;
+             return TYPE_VECTOR_SUBPARTS (vectype) - 1 + 5;
          }
        else
          /* V2DFmode doesn't need a direct move.  */

Reply via email to