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

--- Comment #20 from Haochen Jiang <haochen.jiang at intel dot com> ---
(In reply to Haochen Jiang from comment #19)
> (In reply to Haochen Jiang from comment #18)
> > I have a question, when we are using -march=xxx -mno-avx, should we turn on
> > 128-bit atomics? The current behavior diverges for processors.
> > 
> > For bdver1/2/3 and btver2, it will not. For all the others, it will.
> 
> And another question is, should -march=nehalem -mavx turn on 128-bit
> atomics? Nehalem is not AVX capable here. The current behavior is yes.
> 
> The current behavior really confused me.

And I just checked the SDM and previous bugzilla. From my point of
view, when we are using "-march=xxx -mno-avx", where xxx supports
AVX, it should enable 128-bit atomics. When we are using
"-march=yyy -mavx", where yyy does not support AVX, it should still
not to enable 128-bit atomics.

If that is the case, then we need to fix the current logic to total
processor based and never take something like -mavx into the logic.

Should -march=x86-64-v3+ enable 128-bit atomics remains a question
to me.

Reply via email to