From dc6a314740d6a09810e23acb0367408e846ffbf3 Mon Sep 17 00:00:00 2001 From: Ilya Enkovich Date: Thu, 10 Mar 2016 10:58:57 +0000 Subject: [PATCH] tree-vect-stmts.c (vectorizable_mask_load_store): Check mask has a proper number of elements. gcc/ * tree-vect-stmts.c (vectorizable_mask_load_store): Check mask has a proper number of elements. From-SVN: r234104 --- gcc/ChangeLog | 5 +++++ gcc/tree-vect-stmts.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 77c707f29ab..d1b985d7129 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-03-10 Ilya Enkovich + + * tree-vect-stmts.c (vectorizable_mask_load_store): Check mask + has a proper number of elements. + 2016-03-10 Alan Modra PR rtl-optimization/69195 diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 6ac273dc63d..06b1ab742c4 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -1742,7 +1742,8 @@ vectorizable_mask_load_store (gimple *stmt, gimple_stmt_iterator *gsi, if (!mask_vectype) mask_vectype = get_mask_type_for_scalar_type (TREE_TYPE (vectype)); - if (!mask_vectype || !VECTOR_BOOLEAN_TYPE_P (mask_vectype)) + if (!mask_vectype || !VECTOR_BOOLEAN_TYPE_P (mask_vectype) + || TYPE_VECTOR_SUBPARTS (mask_vectype) != TYPE_VECTOR_SUBPARTS (vectype)) return false; if (is_store)