SET_OPTION_IF_UNSET (opts, &global_options_set,
param_vect_scalar_cost_multiplier, 10000);
+ /* Synchronize the -mautovec-preference and aarch64_autovec_preference using
+ whichever one is not default. If both are set then prefer the param flag
+ over the parameters. */
+ if (opts->x_autovec_preference != AARCH64_AUTOVEC_DEFAULT)
+ SET_OPTION_IF_UNSET (opts, &global_options_set,
+ aarch64_autovec_preference,
+ opts->x_autovec_preference);
+
aarch64_override_options_after_change_1 (opts);
}
Target RejectNegative Joined Enum(sve_vector_bits) Var(aarch64_sve_vector_bits) Init(SVE_SCALABLE)
-msve-vector-bits=<number> Set the number of bits in an SVE vector register.
+mautovec-preference=
+Target RejectNegative Joined Var(autovec_preference) Enum(aarch64_autovec_preference) Init(AARCH64_AUTOVEC_DEFAULT)
+-mautovec-preference=[default|asimd-only|sve-only|prefer-asimd|prefer-sve]
+Force an ISA selection strategy for auto-vectorization. For best performance it
+is highly recommended to use -mcpu or -mtune instead. This parameter should
+only be used for code exploration.
+
mmax-vectorization
Target Var(flag_aarch64_max_vectorization) Save
Override the scalar cost model such that vectorization is always profitable.
-param=aarch64-autovec-preference=
Target Joined Var(aarch64_autovec_preference) Enum(aarch64_autovec_preference) Init(AARCH64_AUTOVEC_DEFAULT) Param
---param=aarch64-autovec-preference=[default|asimd-only|sve-only|prefer-asimd|prefer-sve]
-Force an ISA selection strategy for auto-vectorization.
+An old alias for -mautovec-preference. If both -mautovec-preference and
+--param=aarch64-autovec-preference are passed, the --param value will be used.
Enum
Name(aarch64_autovec_preference) Type(enum aarch64_autovec_preference_enum) UnknownError(unknown autovec preference %qs)
approximation is enabled. The default value is 2.
@item aarch64-autovec-preference
-Force an ISA selection strategy for auto-vectorization.
-@table @samp
-@item default
-Use the default heuristics.
-@item asimd-only
-Use only Advanced SIMD for auto-vectorization.
-@item sve-only
-Use only SVE for auto-vectorization.
-@item prefer-asimd
-Use both Advanced SIMD and SVE. Prefer Advanced SIMD when the costs are
-deemed equal.
-@item prefer-sve
-Use both Advanced SIMD and SVE. Prefer SVE when the costs are deemed equal.
-@end table
+An old alias for @option{-mautovec-preference}. If both
+@option{-mautovec-preference} and @option{--param=aarch64-autovec-preference}
+are passed, the @option{--param} value will be used.
@item aarch64-ldp-policy
Fine-grained policy for load pairs.
@option{-fvect-cost-model=unlimited} this option does not turn off cost
comparison between different vector modes.
+@item -mautovec-preference=@var{name}
+Force an ISA selection strategy for auto-vectorization. The possible
+values of @var{name} are:
+@table @samp
+@item default
+Use the default heuristics.
+@item asimd-only
+Use only Advanced SIMD for auto-vectorization.
+@item sve-only
+Use only SVE for auto-vectorization.
+@item prefer-asimd
+Use both Advanced SIMD and SVE. Prefer Advanced SIMD when the costs are
+deemed equal.
+@item prefer-sve
+Use both Advanced SIMD and SVE. Prefer SVE when the costs are deemed equal.
+@end table
+
+For best performance it is highly recommended to use @option{-mcpu} or
+@option{-mtune} instead. This parameter should only be used for code
+exploration.
+
@opindex march
@item -march=@var{name}
Specify the name of the target architecture and, optionally, one or
--- /dev/null
+/* { dg-options "-mautovec-preference=asimd-only" } */
+
+void
+foo (void) {}
--- /dev/null
+/* { dg-options "-mautovec-preference=default" } */
+
+void
+foo (void) {}
--- /dev/null
+/* { dg-options "-mautovec-preference=prefer-asimd" } */
+
+void
+foo (void) {}
--- /dev/null
+/* { dg-options "-mautovec-preference=prefer-sve" } */
+
+void
+foo (void) {}
--- /dev/null
+/* { dg-options "-mautovec-preference=sve-only" } */
+
+void
+foo (void) {}