diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-07 11:48:03 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-07 11:48:03 +0000 |
commit | f39dd90cdce5bc4e0257b55b4108ceefe0787683 (patch) | |
tree | fe3738ad5093b87424be7b6b2d256b9bbc324125 /gcc/tree-vect-patterns.c | |
parent | eac916f9ae2b96e19014be93bd085394f3774cc9 (diff) |
PR tree-optimization/50650
* tree-vect-patterns.c (vect_recog_mixed_size_cond_pattern): Don't
call vect_is_simple_cond here, instead fail if cond_expr isn't
COMPARISON_CLASS_P or if get_vectype_for_scalar_type returns NULL
for cond_expr's first operand.
* tree-vect-stmts.c (vect_is_simple_cond): Static again.
* tree-vectorizer.h (vect_is_simple_cond): Remove prototype.
* gcc.c-torture/compile/pr50650.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179653 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-patterns.c')
-rw-r--r-- | gcc/tree-vect-patterns.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 0cd350d2dca..a47b87b6f1c 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -1269,8 +1269,12 @@ vect_recog_mixed_size_cond_pattern (VEC (gimple, heap) **stmts, tree *type_in, || TREE_CODE (else_clause) != INTEGER_CST) return NULL; - if (!vect_is_simple_cond (cond_expr, loop_vinfo, &comp_vectype) - || !comp_vectype) + if (!COMPARISON_CLASS_P (cond_expr)) + return NULL; + + comp_vectype + = get_vectype_for_scalar_type (TREE_TYPE (TREE_OPERAND (cond_expr, 0))); + if (comp_vectype == NULL_TREE) return NULL; type = gimple_expr_type (last_stmt); |