This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi,
So, something like the patch attached?
* config/i386/i386.c (ix86_option_override_internal): Turn
on all -mavx target flags by default as they are dependent
on AVX anyway.
Thanks
Sri
On Sun, Jun 30, 2013 at 2:56 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Sun, Jun 30, 2013 at 11:47 AM, Jan Hubicka <hubicka@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.
Attachment:
patch.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |