new file mode 100644
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-mcpu=neoverse-n1" { target aarch64*-*-* } } */
+
+char *a;
+int b;
+void c()
+{
+ int d = 0, e = 0, f;
+ for (; f; ++f)
+ if (a[f] == 5)
+ ;
+ else if (a[f])
+ e = 1;
+ else
+ d = 1;
+ if (d)
+ if (e)
+ b = 0;
+}
@@ -8083,13 +8083,14 @@ vectorizable_reduction (loop_vec_info loop_vinfo,
if ((reduction_type == COND_REDUCTION
|| reduction_type == INTEGER_INDUC_COND_REDUCTION
- || reduction_type == CONST_COND_REDUCTION)
+ || reduction_type == CONST_COND_REDUCTION
+ || reduction_type == EXTRACT_LAST_REDUCTION)
&& slp_node
&& SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node) > 1)
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "multiple types in condition reduction reduction.\n");
+ "multiple types in condition reduction.\n");
return false;
}