aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@gcc.gnu.org>2006-09-05 23:06:55 -0700
committerAndrew Pinski <pinskia@gcc.gnu.org>2006-09-05 23:06:55 -0700
commit10b96810c0f327303ac9a7c1519848f4c51f8eca (patch)
treed0ab6874f5a35f9ba3a0dc3879031098441b3d8e /gcc
parent5df1740de4c12ae9b6d6305069106683f8f82694 (diff)
downloadgcc-10b96810c0f327303ac9a7c1519848f4c51f8eca.zip
gcc-10b96810c0f327303ac9a7c1519848f4c51f8eca.tar.gz
gcc-10b96810c0f327303ac9a7c1519848f4c51f8eca.tar.bz2
re PR tree-optimization/28952 (tree check: expected class 'expression', have 'exceptional' (ssa_name) in vectorizable_condition, at tree-vect-transform.c:2122)
2006-09-05 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/28952 * tree-vect-transform.c (vectorizable_condition): Move the check for the type after the check for simple condition. 2006-09-05 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/28952 * gcc.dg/vect/pr28952.c: New test. From-SVN: r116716
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr28952.c31
-rw-r--r--gcc/tree-vect-transform.c6
4 files changed, 49 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 06c987f..1724238 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-05 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR tree-opt/28952
+ * tree-vect-transform.c (vectorizable_condition): Move the check
+ for the type after the check for simple condition.
+
2006-09-05 J"orn Rennecke <joern.rennecke@st.com>
Kaz Kojima <kkojima@gcc.gnu.org>
@@ -20,10 +26,10 @@
2006-09-05 Anatoly Sokolov <aesok@post.ru>
- * config/avr/avr.c (avr_mcu_types): Add support for at90pwm1 device.
- * config/avr/t-avr (MULTILIB_MATCHES): (Ditto.).
- * config/avr/avr.h (LINK_SPEC, CRT_BINUTILS_SPECS): (Ditto.).
- (avr_rtx_costs): Mark 'outer_code' argument with ATTRIBUTE_UNUSED.
+ * config/avr/avr.c (avr_mcu_types): Add support for at90pwm1 device.
+ * config/avr/t-avr (MULTILIB_MATCHES): (Ditto.).
+ * config/avr/avr.h (LINK_SPEC, CRT_BINUTILS_SPECS): (Ditto.).
+ (avr_rtx_costs): Mark 'outer_code' argument with ATTRIBUTE_UNUSED.
2006-09-05 Richard Guenther <rguenther@suse.de>
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ac55cac..5488b9d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-05 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR tree-opt/28952
+ * gcc.dg/vect/pr28952.c: New test.
+
2006-09-05 Richard Guenther <rguenther@suse.de>
PR tree-optimization/28900
diff --git a/gcc/testsuite/gcc.dg/vect/pr28952.c b/gcc/testsuite/gcc.dg/vect/pr28952.c
new file mode 100644
index 0000000..c5ef65c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr28952.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+
+/* We were ICE because we wanted to check the type of the
+ elements of a conditional before we knew it was a conditional. */
+
+struct player_spaceship
+{
+ _Bool structure[32];
+};
+struct player
+{
+ struct player_spaceship spaceship;
+};
+struct packet_spaceship_info
+{
+ char structure[32 + 1];
+};
+send_spaceship_info (void)
+{
+ int j;
+ struct player *pplayer;
+ struct packet_spaceship_info info;
+ struct player_spaceship *ship = &pplayer->spaceship;
+ for (j = 0; j < 32; j++)
+ {
+ info.structure[j] = ship->structure[j] ? '1' : '0';
+ }
+ lsend_packet_spaceship_info (&info);
+}
+
+
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c
index 5f1b2069..33fdaf7 100644
--- a/gcc/tree-vect-transform.c
+++ b/gcc/tree-vect-transform.c
@@ -2117,14 +2117,14 @@ vectorizable_condition (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
then_clause = TREE_OPERAND (op, 1);
else_clause = TREE_OPERAND (op, 2);
+ if (!vect_is_simple_cond (cond_expr, loop_vinfo))
+ return false;
+
/* 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;
-
if (TREE_CODE (then_clause) == SSA_NAME)
{
tree then_def_stmt = SSA_NAME_DEF_STMT (then_clause);