===================================================================
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+
+extern int g_7;
+void func_13(int p_17) {
+ int i;
+ for (i=0; i < 16; i = (signed char)(i+1)) {
+ g_7 &= p_17;
+ g_7 &= (p_17 > 1);
+ }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
===================================================================
@@ -1823,6 +1823,7 @@ vect_is_slp_reduction (loop_vec_info loop_info, gi
("vect_internal_def"), or it's an induction (defined by a
loop-header phi-node). */
if (def_stmt
+ && gimple_bb (def_stmt)
&& flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
&& (is_gimple_assign (def_stmt)
|| is_gimple_call (def_stmt)
@@ -1852,6 +1853,7 @@ vect_is_slp_reduction (loop_vec_info loop_info, gi
("vect_internal_def"), or it's an induction (defined by a
loop-header phi-node). */
if (def_stmt
+ && gimple_bb (def_stmt)
&& flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
&& (is_gimple_assign (def_stmt)
|| is_gimple_call (def_stmt)