aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 3ab06c6..19203dc 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -620,6 +620,13 @@ default_options_optimization (struct gcc_options *opts,
opt2 ? default_param_value (PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP) : 1000,
opts->x_param_values, opts_set->x_param_values);
+ /* At -Ofast, allow store motion to introduce potential race conditions. */
+ maybe_set_param_value
+ (PARAM_ALLOW_STORE_DATA_RACES,
+ opts->x_optimize_fast ? 1
+ : default_param_value (PARAM_ALLOW_STORE_DATA_RACES),
+ opts->x_param_values, opts_set->x_param_values);
+
if (opts->x_optimize_size)
/* We want to crossjump as much as possible. */
maybe_set_param_value (PARAM_MIN_CROSSJUMP_INSNS, 1,