Message ID | 11780563-05d5-07a5-73cc-93ffe8264c2d@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
Hi Bill, On Fri, Jul 21, 2017 at 10:40:43AM -0500, Bill Schmidt wrote: > 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? Sure, thanks! Segher
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. */