X86: lower ATOMIC_CMP_SWAP_WITH_SUCCESS directly
authorTim Northover <tnorthover@apple.com>
Fri, 13 Jun 2014 17:29:39 +0000 (17:29 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 13 Jun 2014 17:29:39 +0000 (17:29 +0000)
commiteee7a7a8362afddab3fd9bf10b7023da7e7c42e5
tree16aab5a93b11f7b57f646d7246bf04e5966c3041
parentf317d86f8f754e414c1ca52bb3fdc346f990c6cc
X86: lower ATOMIC_CMP_SWAP_WITH_SUCCESS directly

Lowering this new node allows us to fold the almost universal
comparison for success before it's even formed. Instead we can create
a copy from EFLAGS and an X86ISD::SETCC operation since all "cmpxchg"
instructions set the zero-flag to the correct value.

rdar://problem/13201607

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210923 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/cmpxchg-i1.ll [new file with mode: 0644]
test/CodeGen/X86/cmpxchg-i128-i1.ll [new file with mode: 0644]