]> granicus.if.org Git - clang/commit
CodeGen: make use of weaker failure orders on cmpxchg.
authorTim Northover <tnorthover@apple.com>
Thu, 13 Mar 2014 19:25:48 +0000 (19:25 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 13 Mar 2014 19:25:48 +0000 (19:25 +0000)
commitc72aad39783bfe88bb6fdd4e8ea638e8061124f4
tree4bdbae24258adb79dfe8c0b96e3244e0ad0b24f3
parentf5244d23c980f22b6066c4ee7ae528c13d6b507e
CodeGen: make use of weaker failure orders on cmpxchg.

This makes Clang take advantage of the recent IR addition of a
"failure" memory ordering requirement. As with the "success" ordering,
we try to emit just a single version if the expression is constant,
but fall back to runtime detection (to allow optimisation across
function-call boundaries).

rdar://problem/15996804

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203837 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGAtomic.cpp
test/CodeGen/atomic-ops.c