[PATCH, i386]: Fix PR91719, emit XCHG for seq_cst store on big cores

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH, i386]: Fix PR91719, emit XCHG for seq_cst store on big cores

Uros Bizjak-3
Attached patch emits XCHG instead of store+MFENCE on big cores and
generic tuning

m_CORE_ALL | m_BDVER | m_ZNVER | m_GENERIC

(The tune can be added for other targets, too.)

2019-09-16  UroŇ° Bizjak  <[hidden email]>

    PR target/91719
    * config/i386/i386.h (TARGET_USE_XCHG_FOR_ATOMIC_STORE): New macro.
    * config/i386/x86-tune.def (X86_TUNE_USE_XCHG_FOR_ATOMIC_STORE): New.
    * config/i386/sync.md (atomic_store<mode>): emit XCHG for
    TARGET_USE_XCHG_FOR_ATOMIC_STORE.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Committed to mainline SVN.

Uros.

p.diff.txt (2K) Download Attachment