]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/43901 (FAIL: gcc.c-torture/compile/pr42196-2.c)
authorIra Rosen <irar@il.ibm.com>
Thu, 6 May 2010 06:42:51 +0000 (06:42 +0000)
committerIra Rosen <irar@gcc.gnu.org>
Thu, 6 May 2010 06:42:51 +0000 (06:42 +0000)
PR tree-optimization/43901
* tree-vect-stmts.c (vectorizable_call): Assert that vector
type is not NULL if it's transformation phase, and return
FALSE if it's analysis.
(vectorizable_conversion, vectorizable_operation,
vectorizable_type_demotion, vectorizable_type_promotion):
Likewise.

From-SVN: r159095

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

index 3a5973b1200e0abbec3fe86f4edbd9783811ccc2..cfc162937bae6d2554a9b0b5ee12d8fcae3055b3 100644 (file)
@@ -1,3 +1,13 @@
+2010-05-06  Ira Rosen  <irar@il.ibm.com>
+
+       PR tree-optimization/43901
+       * tree-vect-stmts.c (vectorizable_call): Assert that vector
+       type is not NULL if it's transformation phase, and return
+       FALSE if it's analysis.
+       (vectorizable_conversion, vectorizable_operation, 
+       vectorizable_type_demotion, vectorizable_type_promotion):
+       Likewise.
+
 2010-05-05  Andrew Pinski  <andrew.pinski@caviumnetworks.com>
 
        * config/mips/mips.h (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P):
index 0dabb6a365b3e1127238d84157e9d1e5b58dcace..a2c2e203fe7d7c1e7ffe6a9df8522a27e81bf73e 100644 (file)
@@ -1304,6 +1304,18 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt)
      the same size as the output vector type.  */
   if (!vectype_in)
     vectype_in = get_same_sized_vectype (rhs_type, vectype_out);
+  if (vec_stmt)
+    gcc_assert (vectype_in);
+  if (!vectype_in)
+    {
+      if (vect_print_dump_info (REPORT_DETAILS))
+        {
+          fprintf (vect_dump, "no vectype for scalar type ");
+          print_generic_expr (vect_dump, rhs_type, TDF_SLIM);
+        }
+
+      return false;
+    }
 
   /* FORNOW */
   nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
@@ -1606,6 +1618,18 @@ vectorizable_conversion (gimple stmt, gimple_stmt_iterator *gsi,
      the same size as the output vector type.  */
   if (!vectype_in)
     vectype_in = get_same_sized_vectype (rhs_type, vectype_out);
+  if (vec_stmt)
+    gcc_assert (vectype_in);
+  if (!vectype_in)
+    {
+      if (vect_print_dump_info (REPORT_DETAILS))
+        {
+          fprintf (vect_dump, "no vectype for scalar type ");
+          print_generic_expr (vect_dump, rhs_type, TDF_SLIM);
+        }
+
+      return false;
+    }
 
   /* FORNOW */
   nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
@@ -1986,7 +2010,18 @@ vectorizable_operation (gimple stmt, gimple_stmt_iterator *gsi,
      the same size as the output vector type.  */
   if (!vectype)
     vectype = get_same_sized_vectype (TREE_TYPE (op0), vectype_out);
-  gcc_assert (vectype);
+  if (vec_stmt)
+    gcc_assert (vectype);
+  if (!vectype)
+    {
+      if (vect_print_dump_info (REPORT_DETAILS))
+        {
+          fprintf (vect_dump, "no vectype for scalar type ");
+          print_generic_expr (vect_dump, TREE_TYPE (op0), TDF_SLIM);
+        }
+
+      return false;
+    }
 
   nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
   nunits_in = TYPE_VECTOR_SUBPARTS (vectype);
@@ -2449,8 +2484,18 @@ vectorizable_type_demotion (gimple stmt, gimple_stmt_iterator *gsi,
      same size as the output vector type if possible.  */
   if (!vectype_in)
     vectype_in = get_same_sized_vectype (TREE_TYPE (op0), vectype_out);
+  if (vec_stmt)
+    gcc_assert (vectype_in);
   if (!vectype_in)
-    return false;
+    {
+      if (vect_print_dump_info (REPORT_DETAILS))
+        {
+          fprintf (vect_dump, "no vectype for scalar type ");
+          print_generic_expr (vect_dump, TREE_TYPE (op0), TDF_SLIM);
+        }
+
+      return false;
+    }
 
   nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
   nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
@@ -2718,8 +2763,18 @@ vectorizable_type_promotion (gimple stmt, gimple_stmt_iterator *gsi,
      the same size as the output vector type.  */
   if (!vectype_in)
     vectype_in = get_same_sized_vectype (TREE_TYPE (op0), vectype_out);
+  if (vec_stmt)
+    gcc_assert (vectype_in);
   if (!vectype_in)
-    return false;
+    {
+      if (vect_print_dump_info (REPORT_DETAILS))
+        {
+          fprintf (vect_dump, "no vectype for scalar type ");
+          print_generic_expr (vect_dump, TREE_TYPE (op0), TDF_SLIM);
+        }
+
+      return false;
+    }
 
   nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
   nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);