summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorienkovich <ienkovich@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-10 10:58:57 +0000
committerienkovich <ienkovich@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-10 10:58:57 +0000
commit75ad08328909d4b3ca911ef7fc72d6ee6fea4e6c (patch)
tree9d88ad14aa56014eb4a73069ea4a7e8e57204460
parent6972afacbdb3984ba2016c431f43a4d43d2bf30d (diff)
downloadgcc-75ad08328909d4b3ca911ef7fc72d6ee6fea4e6c.tar.gz
gcc/
* tree-vect-stmts.c (vectorizable_mask_load_store): Check mask has a proper number of elements. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234104 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-vect-stmts.c3
2 files changed, 7 insertions, 1 deletions
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 <enkovich.gnu@gmail.com>
+
+ * tree-vect-stmts.c (vectorizable_mask_load_store): Check mask
+ has a proper number of elements.
+
2016-03-10 Alan Modra <amodra@gmail.com>
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)