This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch,i386] Cannot inline sse*.* functions into avx functions
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Sriraman Tallam <tmsriram at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, "H.J. Lu" <hjl dot tools at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, David Li <davidxl at google dot com>, Rong Xu <xur at google dot com>
- Date: Sun, 30 Jun 2013 11:56:27 +0200
- Subject: Re: [patch,i386] Cannot inline sse*.* functions into avx functions
- References: <CAAs8HmywEfzR3CxOUQSQ3z1LC2xvucR--acW0e3Bavy0jO9J1w at mail dot gmail dot com> <CAFULd4aX_Vz=rmMc2yfpu73rPJUY3+kWN-GxNWp5_D-sxiXovg at mail dot gmail dot com> <20130630094328 dot GB1611 at kam dot mff dot cuni dot cz> <20130630094711 dot GA29983 at kam dot mff dot cuni dot cz>
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.