LegalizeDAG: allow libcalls for max/min atomic operations
authorTim Northover <tnorthover@apple.com>
Fri, 25 Oct 2013 09:30:20 +0000 (09:30 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 25 Oct 2013 09:30:20 +0000 (09:30 +0000)
commit5a42ae81f742aaab826b7a72cb0a9a7e5a957a07
tree07cc0b6f69fdb98c6a2ed62bcc48a0562386ed52
parentabe3aa35200e4319f20203b99ebfc4ab6880391c
LegalizeDAG: allow libcalls for max/min atomic operations

ARM processors without ldrex/strex need to be able to make libcalls for all
atomic operations, including the newer min/max versions.

The alternative would probably be expanding these operations in terms of
cmpxchg (as x86 does always), but in the configurations where this matters
code-size tends to be paramount so the libcall is more desirable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193398 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/RuntimeLibcalls.h
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/TargetLoweringBase.cpp
test/CodeGen/ARM/atomic-op.ll