-
- Downloads
tree-optimization/111131 - SLP for non-IFN gathers
The following implements SLP vectorization support for gathers without relying on IFNs being pattern detected (and supported by the target). That includes support for emulated gathers but also the legacy x86 builtin path. PR tree-optimization/111131 * tree-vect-loop.cc (update_epilogue_loop_vinfo): Make sure to update all gather/scatter stmt DRs, not only those that eventually got VMAT_GATHER_SCATTER set. * tree-vect-slp.cc (_slp_oprnd_info::first_gs_info): Add. (vect_get_and_check_slp_defs): Handle gathers/scatters, adding the offset as SLP operand and comparing base and scale. (vect_build_slp_tree_1): Handle gathers. (vect_build_slp_tree_2): Likewise. * gcc.dg/vect/vect-gather-1.c: Now expected to vectorize everywhere. * gcc.dg/vect/vect-gather-2.c: Expected to not SLP anywhere. Massage the scale case to more reliably produce a different one. Scan for the specific messages. * gcc.dg/vect/vect-gather-3.c: Masked gather is also supported for AVX2, but not emulated. * gcc.dg/vect/vect-gather-4.c: Expected to not SLP anywhere. Massage to more properly ensure this. * gcc.dg/vect/tsvc/vect-tsvc-s353.c: Expect to vectorize everywhere.
Showing
- gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s353.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s353.c
- gcc/testsuite/gcc.dg/vect/vect-gather-1.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/vect/vect-gather-1.c
- gcc/testsuite/gcc.dg/vect/vect-gather-2.c 9 additions, 4 deletionsgcc/testsuite/gcc.dg/vect/vect-gather-2.c
- gcc/testsuite/gcc.dg/vect/vect-gather-3.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/vect/vect-gather-3.c
- gcc/testsuite/gcc.dg/vect/vect-gather-4.c 3 additions, 3 deletionsgcc/testsuite/gcc.dg/vect/vect-gather-4.c
- gcc/tree-vect-loop.cc 4 additions, 2 deletionsgcc/tree-vect-loop.cc
- gcc/tree-vect-slp.cc 42 additions, 3 deletionsgcc/tree-vect-slp.cc
Loading
Please register or sign in to comment