Hi, This patch fixes bug 90681. It was caused by trying to SLP vectorize a non grouped load. We've fixed it by tweaking a bit the implementation: mark masked loads as not vectorizable, but support them as an special case. Then the detect them in the test for normal non-grouped loads that was already there.
The bug reproducer now works and the performance test we added is still happy. Alejandro gcc/ChangeLog: 2019-05-31 Alejandro Martinez <alejandro.martinezvice...@arm.com> PR tree-optimization/90681 * internal-fn.c (mask_load_direct): Mark as non-vectorizable again. * tree-vect-slp.c (vect_build_slp_tree_1): Add masked loads as a special case for SLP, but fail on non-grouped loads. 2019-05-31 Alejandro Martinez <alejandro.martinezvice...@arm.com> gcc/testsuite/ PR tree-optimization/90681 * gfortran.dg/vect/pr90681.f: Bug reproducer.
fix.patch
Description: fix.patch