vect: Add extraction cost for slp reduc
authorKewen Lin <linkw@linux.ibm.com>
Tue, 17 Aug 2021 08:18:02 +0000 (03:18 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Tue, 17 Aug 2021 08:18:02 +0000 (03:18 -0500)
commit2e0d7f16da0897fb2eb83f5c1ffe67f0ad747e92
tree4932deb77cf2696cb21709ffa46dadfe55f9991c
parente45483c7c4badc4bf2d6ced22360ce1ab172967f
vect: Add extraction cost for slp reduc

As Richi pointed out, currently for BB reductions we don't
actually build a SLP node with IFN_REDUC_* information,
ideally we may end up with that eventually.

For now, it's costed as shuffles and reduc operations, it
misses the cost of lane extraction.  This patch is to add
one time of vec_to_scalar cost for lane extraction, it's to
make the costings consistent and conservative for now.

gcc/ChangeLog:

* tree-vect-slp.c (vectorizable_bb_reduc_epilogue): Add the cost for
value extraction.
gcc/tree-vect-slp.c