On Tue, Nov 14, 2017 at 6:20 AM, Jakub Jelinek <ja...@redhat.com> wrote:
> 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?
>

I opened:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82990

to track it.

-- 
H.J.

Reply via email to