]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix handling of X86_TUNE_AVOID_512FMA_CHAINS.
authorJan Hubicka <jh@suse.cz>
Wed, 17 Jan 2024 18:14:16 +0000 (19:14 +0100)
committerJan Hubicka <jh@suse.cz>
Wed, 17 Jan 2024 18:14:16 +0000 (19:14 +0100)
I have noticed quite bad pasto in handling of X86_TUNE_AVOID_512FMA_CHAINS.  At the
moment it is ignored, but X86_TUNE_AVOID_256FMA_CHAINS controls 512FMA too.
This patch fixes it, we may want to re-check how that works on AVX512 machines.

gcc/ChangeLog:

* config/i386/i386-options.cc (ix86_option_override_internal): Fix
handling of X86_TUNE_AVOID_512FMA_CHAINS.

gcc/config/i386/i386-options.cc

index 3605c2c53fbd628728658c51134ed37bd97c41bd..b6f634e9a3232e7b9cdb76ec87aa39b3cacc1d55 100644 (file)
@@ -3248,7 +3248,7 @@ ix86_option_override_internal (bool main_args_p,
       = (cf_protection_level) (opts->x_flag_cf_protection | CF_SET);
     }
 
-  if (ix86_tune_features [X86_TUNE_AVOID_256FMA_CHAINS])
+  if (ix86_tune_features [X86_TUNE_AVOID_512FMA_CHAINS])
     SET_OPTION_IF_UNSET (opts, opts_set, param_avoid_fma_max_bits, 512);
   else if (ix86_tune_features [X86_TUNE_AVOID_256FMA_CHAINS])
     SET_OPTION_IF_UNSET (opts, opts_set, param_avoid_fma_max_bits, 256);