+2015-11-23 Ilya Enkovich <enkovich.gnu@gmail.com>
+ Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/68327
+ * tree-vect-loop.c (vect_determine_vectorization_factor): Don't
+ compute vectype for non-relevant mask producers.
+ * gcc/tree-vect-stmts.c (vectorizable_comparison): Check stmt
+ relevance earlier.
+
2015-11-23 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/68460
+2015-11-23 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ PR tree-optimization/68327
+ * gcc.dg/pr68327.c: New test.
+
2015-11-23 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/68460
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+int a, d;
+char b, c;
+
+void
+fn1 ()
+{
+ int i = 0;
+ for (; i < 1; i++)
+ d = 1;
+ for (; b; b++)
+ a = 1 && (d & b);
+}
compute a factor. */
if (TREE_CODE (scalar_type) == BOOLEAN_TYPE)
{
- mask_producers.safe_push (stmt_info);
+ if (STMT_VINFO_RELEVANT_P (stmt_info))
+ mask_producers.safe_push (stmt_info);
bool_result = true;
if (gimple_code (stmt) == GIMPLE_ASSIGN
tree mask_type;
tree mask;
+ if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
+ return false;
+
if (!VECTOR_BOOLEAN_TYPE_P (vectype))
return false;
ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits;
gcc_assert (ncopies >= 1);
- if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
- return false;
-
if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_internal_def
&& !(STMT_VINFO_DEF_TYPE (stmt_info) == vect_nested_cycle
&& reduc_def))