is the maximum of the estimated number of iterations of the inner loop and
this parameter. The default value of this parameter is 50.
+@item vect-induction-float
+Enable loop vectorization of floating point inductions.
+
@item avoid-fma-max-bits
Maximum number of bits for which we avoid creating FMAs.
Common Joined UInteger Var(param_vect_inner_loop_cost_factor) Init(50) IntegerRange(1, 10000) Param Optimization
The maximum factor which the loop vectorizer applies to the cost of statements in an inner loop relative to the loop being vectorized.
+-param=vect-induction-float=
+Common Joined UInteger Var(param_vect_induction_float) Init(1) IntegerRage(0, 1) Param Optimization
+Enable loop vectorization of floating point inductions.
+
-param=vrp1-mode=
Common Joined Var(param_vrp1_mode) Enum(vrp_mode) Init(VRP_MODE_VRP) Param Optimization
--param=vrp1-mode=[vrp|ranger] Specifies the mode VRP1 should operate in.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-additional-options "-Ofast --param vect-induction-float=0" } */
+
+void foo (float *a, float f, float s, int n)
+{
+ for (int i = 0; i < n; ++i)
+ {
+ a[i] = f;
+ f += s;
+ }
+}
+
+void bar (double *a, double f, double s, int n)
+{
+ for (int i = 0; i < n; ++i)
+ {
+ a[i] = f;
+ f += s;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 2 "vect" } } */
return false;
}
+ if (FLOAT_TYPE_P (vectype) && !param_vect_induction_float)
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "floating point induction vectorization disabled\n");
+ return false;
+ }
+
step_expr = STMT_VINFO_LOOP_PHI_EVOLUTION_PART (stmt_info);
gcc_assert (step_expr != NULL_TREE);
tree step_vectype = get_same_sized_vectype (TREE_TYPE (step_expr), vectype);