]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix PR90332 by extending half size vector mode
authorKewen Lin <linkw@linux.ibm.com>
Fri, 27 Mar 2020 09:51:12 +0000 (04:51 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Fri, 27 Mar 2020 11:02:32 +0000 (06:02 -0500)
commit8d689cf43b501a2f5c077389adbb6d2bfa530ca9
treeff7446b65f9c5402da5ffdd6d26d2008aeaa4f05
parent66e0e23c12d143c8caf787d95ff356f009b1fca9
Fix PR90332 by extending half size vector mode

As PR90332 shows, the current scalar epilogue peeling for gaps
elimination requires expected vec_init optab with two half size
vector mode.  On Power, we don't support vector mode like V8QI,
so can't support optab like vec_initv16qiv8qi.  But we want to
leverage existing scalar mode like DI to init the desirable
vector mode.  This patch is to extend the existing support for
Power, as evaluated on Power9 we can see expected 1.9% speed up
on SPEC2017 525.x264_r.

As Richi suggested, add one function vector_vector_composition_type
to refactor existing related codes and also make use of it further.

Bootstrapped/regtested on powerpc64le-linux-gnu (LE) P8 and P9,
as well as x86_64-redhat-linux.

gcc/ChangeLog

2020-03-27  Kewen Lin  <linkw@gcc.gnu.org>

    PR tree-optimization/90332
    * tree-vect-stmts.c (vector_vector_composition_type): New function.
    (get_group_load_store_type): Adjust to call vector_vector_composition_type,
    extend it to construct with scalar types.
    (vectorizable_load): Likewise.
gcc/ChangeLog
gcc/tree-vect-stmts.c