[PATCH] D13033: [AArch64/ARM] Emit clrex in the ll/sc-expanded cmpxchg no-store path.
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 14:52:19 PDT 2015
ab created this revision.
ab added reviewers: t.p.northover, jmolloy.
ab added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.
In the comparison failure path of a cmpxchg expansion, the initial
ldrex/ldxr will not be followed by a matching strex/stxr.
On ARM/AArch64, this unnecessarily ties up the execution monitor,
which might have a negative performance impact on some uarchs.
Instead, release the monitor in the failure block.
The clrex instruction was designed for this: use it.
Also see ARMARM v8-A B2.10.2:
"Exclusive access instructions and Shareable memory locations".
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 35954 bytes
Desc: not available
More information about the llvm-commits