Disable slp in loop vectorizer when cost model is very-cheap.
authorliuhongt <hongtao.liu@intel.com>
Wed, 4 Aug 2021 08:39:31 +0000 (16:39 +0800)
committerliuhongt <hongtao.liu@intel.com>
Tue, 24 Aug 2021 01:27:53 +0000 (09:27 +0800)
commit819b7c3a339e3bdaf85cd55954c5536bd98aae09
treee12e3c6109ce0a7f55df0b32e87a4b12520d08d2
parent38b19c5b0805f9acfcf52430cebca025fc3cdea6
Disable slp in loop vectorizer when cost model is very-cheap.

Performance impact for the commit with option:
-march=x86-64 -O2 -ftree-vectorize -fvect-cost-model=very-cheap

SPEC2017 fprate
503.bwaves_r        BuildSame
507.cactuBSSN_r         -0.04
508.namd_r               0.14
510.parest_r            -0.54
511.povray_r             0.10
519.lbm_r           BuildSame
521.wrf_r                0.64
526.blender_r           -0.32
527.cam4_r               0.17
538.imagick_r            0.09
544.nab_r           BuildSame
549.fotonik3d_r     BuildSame
554.roms_r          BuildSame
997.specrand_fr         -0.09
Geometric mean:  0.02

SPEC2017 intrate
500.perlbench_r          0.26
502.gcc_r                0.21
505.mcf_r               -0.09
520.omnetpp_r       BuildSame
523.xalancbmk_r     BuildSame
525.x264_r              -0.41
531.deepsjeng_r     BuildSame
541.leela_r              0.13
548.exchange2_r     BuildSame
557.xz_r            BuildSame
999.specrand_ir     BuildSame
Geometric mean:  0.02

EEMBC: no regression, only improvement or build the same, the below is
improved benchmarks.

mp2decoddata1       7.59
mp2decoddata2       31.80
mp2decoddata3       12.15
mp2decoddata4       11.16
mp2decoddata5       11.19
mp2decoddata1       7.06
mp2decoddata2       24.12
mp2decoddata3       10.83
mp2decoddata4       10.04
mp2decoddata5       10.07

gcc/ChangeLog:

PR tree-optimization/100089
* tree-vectorizer.c (try_vectorize_loop_1): Disable slp in
loop vectorizer when cost model is very-cheap.
gcc/tree-vectorizer.c