tree-vect-generic.c (expand_vector_operations_1): Check optab type before using it.
authorIlya Enkovich <enkovich.gnu@gmail.com>
Tue, 27 Oct 2015 11:08:16 +0000 (11:08 +0000)
committerIlya Enkovich <ienkovich@gcc.gnu.org>
Tue, 27 Oct 2015 11:08:16 +0000 (11:08 +0000)
gcc/

* tree-vect-generic.c (expand_vector_operations_1): Check
optab type before using it.

From-SVN: r229413

gcc/ChangeLog
gcc/tree-vect-generic.c

index c5c44bd773a121f56aae3e93bf70730e54a9eb79..a2933215b2ed70f0d295530caa8f40fcba097cd7 100644 (file)
@@ -1,3 +1,8 @@
+2015-10-27  Ilya Enkovich  <enkovich.gnu@gmail.com>
+
+       * tree-vect-generic.c (expand_vector_operations_1): Check
+       optab type before using it.
+
 2015-10-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * config/aarch64/aarch64-protos.h
index d0a4e0f564761a8c33fc87044ce3f86692998838..73c5cc5e946f6bca07a0c2c0664f9aedc1e61c95 100644 (file)
@@ -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));