OSDN Git Service

[X86] Improve lowering of idemptotent RMW operations
authorPhilip Reames <listmail@philipreames.com>
Thu, 9 May 2019 23:23:42 +0000 (23:23 +0000)
committerPhilip Reames <listmail@philipreames.com>
Thu, 9 May 2019 23:23:42 +0000 (23:23 +0000)
commit4b4cf0d82d8efe1c6d64f9d2dd8213f35799c7de
treefc03e74ef6f02a2f813ed75e132bf5697fffdab1
parent76e6710242e15da426f00dd4503bdf385956780b
[X86] Improve lowering of idemptotent RMW operations

The current lowering uses an mfence. mfences are substaintially higher latency than the locked operations originally requested, but we do want to avoid contention on the original cache line. As such, use a locked instruction on a cache line assumed to be thread local.

Differential Revision: https://reviews.llvm.org/D58632

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360393 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/atomic-idempotent.ll