+2017-09-18 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
+ to vect_get_vec_def_for_operand when getting the mask operand.
+
2017-09-18 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
+2017-09-18 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * gfortran.dg/vect/mask-store-1.f90: New test.
+
2017-09-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/45033
--- /dev/null
+subroutine foo(a, b, x, n)
+ real(kind=8) :: a(n), b(n), tmp
+ logical(kind=1) :: x
+ integer(kind=4) :: i, n
+ do i = 1, n
+ if (x) then
+ a(i) = b(i)
+ end if
+ b(i) = b(i) + 10
+ end do
+end subroutine
{
tree rhs = gimple_call_arg (stmt, 3);
vec_rhs = vect_get_vec_def_for_operand (rhs, stmt);
- vec_mask = vect_get_vec_def_for_operand (mask, stmt);
+ vec_mask = vect_get_vec_def_for_operand (mask, stmt,
+ mask_vectype);
/* We should have catched mismatched types earlier. */
gcc_assert (useless_type_conversion_p (vectype,
TREE_TYPE (vec_rhs)));
if (i == 0)
{
- vec_mask = vect_get_vec_def_for_operand (mask, stmt);
+ vec_mask = vect_get_vec_def_for_operand (mask, stmt,
+ mask_vectype);
dataref_ptr = vect_create_data_ref_ptr (stmt, vectype, NULL,
NULL_TREE, &dummy, gsi,
&ptr_incr, false, &inv_p);