re PR middle-end/50650 (ICE in vect_is_simple_use_1, at tree-vect-stmts.c:5689)
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. From-SVN: r179653
This commit is contained in:
parent
228ee42613
commit
87aab9b24b
|
@ -1,3 +1,13 @@
|
||||||
|
2011-10-07 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
2011-10-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
2011-10-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
||||||
|
|
||||||
* config/s390/s390.md (DWH, dwh): New mode macros.
|
* config/s390/s390.md (DWH, dwh): New mode macros.
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2011-10-07 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR tree-optimization/50650
|
||||||
|
* gcc.c-torture/compile/pr50650.c: New test.
|
||||||
|
|
||||||
2011-10-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
2011-10-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||||
|
|
||||||
PR tree-optimization/50575
|
PR tree-optimization/50575
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
/* PR tree-optimization/50650 */
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
foo (unsigned int x, unsigned int y)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 8; i--; x <<= 1)
|
||||||
|
y ^= (x ^ y) & 0x80 ? 79U : 0U;
|
||||||
|
return y;
|
||||||
|
}
|
|
@ -1269,8 +1269,12 @@ vect_recog_mixed_size_cond_pattern (VEC (gimple, heap) **stmts, tree *type_in,
|
||||||
|| TREE_CODE (else_clause) != INTEGER_CST)
|
|| TREE_CODE (else_clause) != INTEGER_CST)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!vect_is_simple_cond (cond_expr, loop_vinfo, &comp_vectype)
|
if (!COMPARISON_CLASS_P (cond_expr))
|
||||||
|| !comp_vectype)
|
return NULL;
|
||||||
|
|
||||||
|
comp_vectype
|
||||||
|
= get_vectype_for_scalar_type (TREE_TYPE (TREE_OPERAND (cond_expr, 0)));
|
||||||
|
if (comp_vectype == NULL_TREE)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
type = gimple_expr_type (last_stmt);
|
type = gimple_expr_type (last_stmt);
|
||||||
|
|
|
@ -4698,7 +4698,7 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
|
||||||
Returns whether a COND can be vectorized. Checks whether
|
Returns whether a COND can be vectorized. Checks whether
|
||||||
condition operands are supportable using vec_is_simple_use. */
|
condition operands are supportable using vec_is_simple_use. */
|
||||||
|
|
||||||
bool
|
static bool
|
||||||
vect_is_simple_cond (tree cond, loop_vec_info loop_vinfo, tree *comp_vectype)
|
vect_is_simple_cond (tree cond, loop_vec_info loop_vinfo, tree *comp_vectype)
|
||||||
{
|
{
|
||||||
tree lhs, rhs;
|
tree lhs, rhs;
|
||||||
|
|
|
@ -818,7 +818,6 @@ extern bool vect_transform_stmt (gimple, gimple_stmt_iterator *,
|
||||||
bool *, slp_tree, slp_instance);
|
bool *, slp_tree, slp_instance);
|
||||||
extern void vect_remove_stores (gimple);
|
extern void vect_remove_stores (gimple);
|
||||||
extern bool vect_analyze_stmt (gimple, bool *, slp_tree);
|
extern bool vect_analyze_stmt (gimple, bool *, slp_tree);
|
||||||
extern bool vect_is_simple_cond (tree, loop_vec_info, tree *);
|
|
||||||
extern bool vectorizable_condition (gimple, gimple_stmt_iterator *, gimple *,
|
extern bool vectorizable_condition (gimple, gimple_stmt_iterator *, gimple *,
|
||||||
tree, int);
|
tree, int);
|
||||||
extern void vect_get_load_cost (struct data_reference *, int, bool,
|
extern void vect_get_load_cost (struct data_reference *, int, bool,
|
||||||
|
|
Loading…
Reference in New Issue