On 10/11/15 09:34, Richard Biener wrote:

The following fixes PR56118 by adjusting the cost model handling of
basic-block vectorization to favor the vectorized version in case
estimated cost is the same as the estimated cost of the scalar
version.  This makes sense because we over-estimate the vectorized
cost in several places.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2015-11-10  Richard Biener  <rguent...@suse.de>

        PR tree-optimization/56118
        * tree-vect-slp.c (vect_bb_vectorization_profitable_p): Make equal
        cost favor vectorized version.

        * gcc.target/i386/pr56118.c: New testcase.

On AArch64 and ARM targets, this causes PASS->FAIL of

gcc.dg/vect/bb-slp-32.c scan-tree-dump slp2 "vectorization is not profitable"
gcc.dg/vect/bb-slp-32.c -flto -ffat-lto-objects scan-tree-dump slp2 "vectorization is not profitable"

....that sounds like a good thing ;), so I imagine the xfail directive may just need updating. The test also looks to be failing on powerpc64 (according to https://gcc.gnu.org/ml/gcc-testresults/2015-11/msg01327.html).

Regards, Alan

Reply via email to