From e6f5c25d913d3c4e437d6b8b5201a89eb425de9a Mon Sep 17 00:00:00 2001 From: Ilya Enkovich Date: Tue, 10 Nov 2015 12:17:30 +0000 Subject: optabs.c (expand_binop_directly): Allow scalar mode for vec_pack_trunc_optab. gcc/ * optabs.c (expand_binop_directly): Allow scalar mode for vec_pack_trunc_optab. * tree-vect-loop.c (vect_determine_vectorization_factor): Skip boolean vector producers from pattern sequence when computing VF. * tree-vect-patterns.c (vect_vect_recog_func_ptrs) Add vect_recog_mask_conversion_pattern. (search_type_for_mask): Choose the smallest type if different size types are mixed. (build_mask_conversion): New. (vect_recog_mask_conversion_pattern): New. (vect_pattern_recog_1): Allow scalar mode for boolean vectype. * tree-vect-stmts.c (vectorizable_mask_load_store): Support masked load with pattern. (vectorizable_conversion): Support boolean vectors. (free_stmt_vec_info): Allow patterns for statements with no lhs. * tree-vectorizer.h (NUM_PATTERNS): Increase to 14. From-SVN: r230103 --- gcc/optabs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/optabs.c') diff --git a/gcc/optabs.c b/gcc/optabs.c index 9b8e95855c9..554530282db 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -1047,7 +1047,8 @@ expand_binop_directly (machine_mode mode, optab binoptab, /* The mode of the result is different then the mode of the arguments. */ tmp_mode = insn_data[(int) icode].operand[0].mode; - if (GET_MODE_NUNITS (tmp_mode) != 2 * GET_MODE_NUNITS (mode)) + if (VECTOR_MODE_P (mode) + && GET_MODE_NUNITS (tmp_mode) != 2 * GET_MODE_NUNITS (mode)) { delete_insns_since (last); return NULL_RTX; -- cgit v1.2.1