2006-05-06 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 6 May 2006 17:37:53 +0000 (17:37 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 6 May 2006 17:37:53 +0000 (17:37 +0000)
PR tree-optimization/27151
* tree-vect-transform.c (vectorizable_condition): Punt on
values that have a different type than the condition.

* gcc.dg/vect/pr27151.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113580 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr27151.c [new file with mode: 0644]
gcc/tree-vect-transform.c

index e202013..bae2982 100644 (file)
@@ -1,3 +1,9 @@
+2006-05-06   Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/27151
+       * tree-vect-transform.c (vectorizable_condition): Punt on
+       values that have a different type than the condition.
+
 2006-05-03  Aldy Hernandez  <aldyh@redhat.com>
 
        PR/21391
index d259e40..3e6e725 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-06   Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/27151
+       * gcc.dg/vect/pr27151.c: New testcase.
+
 2006-05-06  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
        PR c++/27430
diff --git a/gcc/testsuite/gcc.dg/vect/pr27151.c b/gcc/testsuite/gcc.dg/vect/pr27151.c
new file mode 100644 (file)
index 0000000..8b53b29
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+/* We were creating a float vector for the vis_type == 1
+   test, which we ICEd on.  Now we simply punt here.  */
+
+float vs_data[75];
+void vis_clear_data ()
+{
+  int vis_type, i;
+  for (i = 0; i < 75; i++)
+    {
+      vs_data[i] = (vis_type == 1);
+    }
+}
index b1a9b0a..8c65b86 100644 (file)
@@ -2117,6 +2117,11 @@ vectorizable_condition (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
   then_clause = TREE_OPERAND (op, 1);
   else_clause = TREE_OPERAND (op, 2);
 
+  /* We do not handle two different vector types for the condition
+     and the values.  */
+  if (TREE_TYPE (TREE_OPERAND (cond_expr, 0)) != TREE_TYPE (vectype))
+    return false;
+
   if (!vect_is_simple_cond (cond_expr, loop_vinfo))
     return false;