diff options
author | Andrew Pinski <pinskia@gcc.gnu.org> | 2006-09-05 23:06:55 -0700 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2006-09-05 23:06:55 -0700 |
commit | 10b96810c0f327303ac9a7c1519848f4c51f8eca (patch) | |
tree | d0ab6874f5a35f9ba3a0dc3879031098441b3d8e /gcc/tree-vect-transform.c | |
parent | 5df1740de4c12ae9b6d6305069106683f8f82694 (diff) | |
download | gcc-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/tree-vect-transform.c')
-rw-r--r-- | gcc/tree-vect-transform.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |