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]

Re: [PATCH][i386] PR82941/PR82942 - Adding vzeroupper generation for SKX


On Tue, Nov 14, 2017 at 06:14:10AM -0800, H.J. Lu wrote:
> Just a thought, should we have a separate patch to add -mprefer-vzeroupper
> to cover all bases in the future, like
> 
>   /* opt_pass methods: */
>   virtual bool gate (function *)
>     {
>       return TARGET_AVX && (!TARGET_AVX512ER || TARGET_PREFER_VZEROUPPER)
>              && TARGET_VZEROUPPER && flag_expensive_optimizations
>              && !optimize_size;
>     }

If we have it, then shouldn't explicit -mprefer-vzeroupper or
-mno-prefer-vzeroupper override whatever other optimization
conditions there are (i.e. everything other than
TARGET_AVX and TARGET_VZEROUPPER)?  I.e. use
!TARGET_AVX512ER && flag_expensive_optimizations && !optimize_size
only when the explicit bit is not set for it?

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]