On Sun, Jun 30, 2013 at 11:47 AM, Jan Hubicka <hubi...@ucw.cz> wrote: >> >> What target flags are enabled by AVX? Assumming that all target flags are >> positive seems incorrect to me (like -mno-red-zone function can not be >> inlined >> into -mred-zone). Does those conditionally enabled AVX codegen flags have >> any > > Actually -mred-zone seems right, but stuff like -msseregparm will probably > break? > > Honza > >> effect when AVX is disabled? Perhaps we can set them unconditionally?
The issue is with (config/i386.c, ix86_option_override_internal): if (TARGET_AVX) { /* When not optimize for size, enable vzeroupper optimization for TARGET_AVX with -fexpensive-optimizations and split 32-byte AVX unaligned load/store. */ if (!optimize_size) { if (flag_expensive_optimizations && !(target_flags_explicit & MASK_VZEROUPPER)) target_flags |= MASK_VZEROUPPER; if ((x86_avx256_split_unaligned_load & ix86_tune_mask) && !(target_flags_explicit & MASK_AVX256_SPLIT_UNALIGNED_LOAD)) target_flags |= MASK_AVX256_SPLIT_UNALIGNED_LOAD; if ((x86_avx256_split_unaligned_store & ix86_tune_mask) && !(target_flags_explicit & MASK_AVX256_SPLIT_UNALIGNED_STORE)) target_flags |= MASK_AVX256_SPLIT_UNALIGNED_STORE; /* Enable 128-bit AVX instruction generation for the auto-vectorizer. */ if (TARGET_AVX128_OPTIMAL && !(target_flags_explicit & MASK_PREFER_AVX128)) target_flags |= MASK_PREFER_AVX128; } These are all tuning flags that are applicable to AVX only. They depend on AVX, so can be probably enabled unconditionally. Uros.