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

--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Hongtao.liu from comment #1)
> I guess we can add a peephole for this, middle-end optimizer doesn't know
> cmpccxadd set EFLAGS same as cmp.

We already have a peephole for cmpxchg, for cmpxchg it's only valid for
CCZmode, but for cmpccxadd, it should be ok for all CCmode since it sets EFLAGS
exactly the same as CMP. The _CMPCCX_Z in the intrinsic is used as condition of
updating memory.

Reply via email to