new file mode 100644
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -ftree-loop-vectorize -fno-tree-fre" } */
+/* { dg-additional-options "-march=armv8-a+sve" { target aarch64-*-* } } */
+
+
+
+signed char i;
+
+void
+foo (void)
+{
+ for (i = 0; i < 6; i += 5)
+ ;
+}
@@ -1990,14 +1990,14 @@ dom_opt_dom_walker::optimize_stmt (basic_block bb, gimple_stmt_iterator *si,
print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
}
- update_stmt_if_modified (stmt);
- opt_stats.num_stmts++;
-
/* STMT may be a comparison of uniform vectors that we can simplify
down to a comparison of scalars. Do that transformation first
so that all the scalar optimizations from here onward apply. */
reduce_vector_comparison_to_scalar_comparison (stmt);
+ update_stmt_if_modified (stmt);
+ opt_stats.num_stmts++;
+
/* Const/copy propagate into USES, VUSES and the RHS of VDEFs. */
cprop_into_stmt (stmt, m_evrp_range_analyzer);