diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-06 06:06:55 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-06 06:06:55 +0000 |
commit | 4ff650b4cb860c45477d14f3ce9da70d66b2f910 (patch) | |
tree | d0ab6874f5a35f9ba3a0dc3879031098441b3d8e /gcc/tree-vect-transform.c | |
parent | 2b4435765c3e87dcdd03ab9fa7507d2b6a08361c (diff) | |
download | gcc-4ff650b4cb860c45477d14f3ce9da70d66b2f910.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116716 138bc75d-0d04-0410-961f-82ee72b054a4
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 5f1b2069ceb..33fdaf75746 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); |