* 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
+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>
* config/s390/s390.md (DWH, dwh): New mode macros.
+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>
PR tree-optimization/50575
--- /dev/null
+/* 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;
+}
|| 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);
Returns whether a COND can be vectorized. Checks whether
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)
{
tree lhs, rhs;
bool *, slp_tree, slp_instance);
extern void vect_remove_stores (gimple);
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 *,
tree, int);
extern void vect_get_load_cost (struct data_reference *, int, bool,