tree-vectorizer.c (vectorizable_operation): Fail unless the mode for the vector type...
authorPaolo Bonzini <bonzini@gcc.gnu.org>
Fri, 1 Oct 2004 09:59:01 +0000 (09:59 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Fri, 1 Oct 2004 09:59:01 +0000 (09:59 +0000)
2004-10-01  Paolo Bonzini  <bonzini@gnu.org>

* tree-vectorizer.c (vectorizable_operation): Fail unless
the mode for the vector type is indeed a vector mode.

From-SVN: r88390

gcc/ChangeLog
gcc/tree-vectorizer.c

index 7bce5712a13fc2d87a6e634536d9a5dfc234a9ce..d7d99a7887c1efe6c82ca698deaac0ce3baff06e 100644 (file)
@@ -1,8 +1,13 @@
+2004-10-01  Paolo Bonzini  <bonzini@gnu.org>
+
+       * tree-vectorizer.c (vectorizable_operation): Fail unless
+       the mode for the vector type is indeed a vector mode.
+
 2004-10-01  Zdenek Dvorak  <dvorakz@suse.cz>
 
        * tree-chrec.c (chrec_fold_plus_poly_poly, chrec_fold_plus_1,
        chrec_fold_multiply): Use fold_convert or build_int_cst_type instead
-       od fonvert.
+       of convert.
        * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop,
        add_to_evolution, set_nb_iterations_in_loop, follow_ssa_edge_in_rhs,
        follow_ssa_edge_in_rhs): Ditto.
index 4493da19c52a73a238066f47a27b4355f903331e..e4de78637d3ac34dc1e22b9e95628f66fae36bda 100644 (file)
@@ -1408,6 +1408,16 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
       return false;
     }
   vec_mode = TYPE_MODE (vectype);
+  if (!VECTOR_MODE_P (vec_mode))
+    {
+      /* TODO: tree-complex.c sometimes can parallelize operations
+        on generic vectors.  We can vectorize the loop in that case,
+        but then we should re-run the lowering pass.  */
+      if (vect_debug_details (NULL))
+       fprintf (dump_file, "mode not supported by target.");
+      return false;
+    }
+
   if (optab->handlers[(int) vec_mode].insn_code == CODE_FOR_nothing)
     {
       if (vect_debug_details (NULL))
@@ -1421,7 +1431,7 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
       return true;
     }
 
-  /** Trasform.  **/
+  /** Transform.  **/
 
   if (vect_debug_details (NULL))
     fprintf (dump_file, "transform binary/unary operation.");