summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-generic.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-25 13:52:52 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-25 13:52:52 +0000
commit7ecc75116f240af25961f8d098c44d13b17ebd82 (patch)
tree1392f42ed9672235ce6a8dcafeb9af8365e9ee2b /gcc/tree-vect-generic.c
parentfb34a6cf92e4bef271061011000ab36c636a6fe5 (diff)
downloadgcc-7ecc75116f240af25961f8d098c44d13b17ebd82.tar.gz
PR tree-optimization/60960
* tree-vect-generic.c (expand_vector_operation): Only call expand_vector_divmod if type's mode satisfies VECTOR_MODE_P. * gcc.c-torture/execute/pr60960.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209802 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-generic.c')
-rw-r--r--gcc/tree-vect-generic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index d8b22000166..2ca19f04abc 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -971,7 +971,8 @@ expand_vector_operation (gimple_stmt_iterator *gsi, tree type, tree compute_type
if (!optimize
|| !VECTOR_INTEGER_TYPE_P (type)
- || TREE_CODE (rhs2) != VECTOR_CST)
+ || TREE_CODE (rhs2) != VECTOR_CST
+ || !VECTOR_MODE_P (TYPE_MODE (type)))
break;
ret = expand_vector_divmod (gsi, type, rhs1, rhs2, code);