From: Ilya Enkovich Date: Tue, 27 Oct 2015 11:08:16 +0000 (+0000) Subject: tree-vect-generic.c (expand_vector_operations_1): Check optab type before using it. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cbf3bf32926abd16cd5e38b2bee912f51cf30bbd;p=gcc.git tree-vect-generic.c (expand_vector_operations_1): Check optab type before using it. gcc/ * tree-vect-generic.c (expand_vector_operations_1): Check optab type before using it. From-SVN: r229413 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c5c44bd773a..a2933215b2e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-27 Ilya Enkovich + + * tree-vect-generic.c (expand_vector_operations_1): Check + optab type before using it. + 2015-10-27 Kyrylo Tkachov * config/aarch64/aarch64-protos.h diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c index d0a4e0f5647..73c5cc5e946 100644 --- a/gcc/tree-vect-generic.c +++ b/gcc/tree-vect-generic.c @@ -1533,7 +1533,7 @@ expand_vector_operations_1 (gimple_stmt_iterator *gsi) && TYPE_MODE (TREE_TYPE (type)) == TYPE_MODE (TREE_TYPE (srhs1))) { op = optab_for_tree_code (code, TREE_TYPE (type), optab_scalar); - if (op != unknown_optab + if (op >= FIRST_NORM_OPTAB && op <= LAST_NORM_OPTAB && optab_handler (op, TYPE_MODE (TREE_TYPE (type))) != CODE_FOR_nothing) { tree slhs = make_ssa_name (TREE_TYPE (srhs1));