Re: [PATCH, rs6000] Fix PR85080
Hi Bill, On Sun, Apr 15, 2018 at 09:41:04PM -0500, Bill Schmidt wrote: > PR85080 identifies a test case that started failing last year when > an improvement was made to the vectorizer. The failure turns out to > be appropriate. The test used to not expect the loop in the first > function to be vectorized, because the cost of potentially unaligned > loads made this unprofitable. However, with Power8 and later hardware, > this is no longer the case. This patch adjusts the test to only check > its results for targets that have inefficient unaligned loads. > --- gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c > (revision 259389) > +++ gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c > (working copy) > @@ -22,6 +22,6 @@ ggSpectrum_Set20(float * data, float d) >data[i] = d; > } > > -/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" > } } */ > -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ > +/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" > { target { ! vect_hw_misalign } } } } */ > +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target > { ! vect_hw_misalign } } } } */ Alternatively you could skip the whole test if vect_hw_misalign. But this is fine. Okay for trunk (and backports if needed/wanted). Thanks! Segher
[PATCH, rs6000] Fix PR85080
Hi, PR85080 identifies a test case that started failing last year when an improvement was made to the vectorizer. The failure turns out to be appropriate. The test used to not expect the loop in the first function to be vectorized, because the cost of potentially unaligned loads made this unprofitable. However, with Power8 and later hardware, this is no longer the case. This patch adjusts the test to only check its results for targets that have inefficient unaligned loads. Tested on powerpc64le-linux-gnu (POWER8) and powerpc64-linux-gnu (POWER7). Is this okay for trunk? Thanks, Bill [gcc/testsuite] 2018-04-16 Bill SchmidtPR target/85080 * gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c: Skip dump checks if the target supports efficient unaligned storage accesses. Index: gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c === --- gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c (revision 259389) +++ gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c (working copy) @@ -22,6 +22,6 @@ ggSpectrum_Set20(float * data, float d) data[i] = d; } -/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target { ! vect_hw_misalign } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_hw_misalign } } } } */