aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2006-05-06 17:37:53 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2006-05-06 17:37:53 +0000
commit75bfa67836449ebe29c760185ccae8ce070a4e9c (patch)
treef020a91e9818ef4ec2243fe403201ddbd3dd0eb4 /gcc
parent2297e173c6f3530f5d6f24d45dd605b540025031 (diff)
downloadgcc-75bfa67836449ebe29c760185ccae8ce070a4e9c.zip
gcc-75bfa67836449ebe29c760185ccae8ce070a4e9c.tar.gz
gcc-75bfa67836449ebe29c760185ccae8ce070a4e9c.tar.bz2
re PR tree-optimization/27151 (ICE with -ftree-vectorize with mixed types)
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. * gcc.dg/vect/pr27151.c: New testcase. From-SVN: r113580
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr27151.c14
-rw-r--r--gcc/tree-vect-transform.c5
4 files changed, 30 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e202013..bae2982 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d259e40..3e6e725 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..8b53b29
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr27151.c
@@ -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);
+ }
+}
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c
index b1a9b0a..8c65b86 100644
--- a/gcc/tree-vect-transform.c
+++ b/gcc/tree-vect-transform.c
@@ -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;