Fix vectorizable_mask_load_store handling of invariant masks
vectorizable_mask_load_store was not passing the required mask type to
vect_get_vec_def_for_operand. This doesn't matter for masks that are
defined in the loop, since their STMT_VINFO_VECTYPE will be what we need
anyway. But it's not possible to tell which mask type the caller needs
when looking at an invariant scalar boolean. As the comment above the
function says:
In case OP is an invariant or constant, a new stmt that creates a vector def
needs to be introduced. VECTYPE may be used to specify a required type for
vector invariant.
This fixes the attached testcase for SVE.
2017-09-18 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
to vect_get_vec_def_for_operand when getting the mask operand.
gcc/testsuite/
* gfortran.dg/vect/mask-store-1.f90: New test.
From-SVN: r252932