Fix a critical bug in 64-bit atomic operation lowering for 32-bit. The results of...
authorEvan Cheng <evan.cheng@apple.com>
Fri, 8 Jan 2010 23:41:50 +0000 (23:41 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 8 Jan 2010 23:41:50 +0000 (23:41 +0000)
commit306b4cafc1fd8c075c422825c49bdd14a5f851d7
tree1cb54fea8d9cfa1c3f980f10efb17457dd569800
parentd003c5b3d750706cdc0bfa34ebf85b95a7a42abe
Fix a critical bug in 64-bit atomic operation lowering for 32-bit. The results of the cmpxchg8b instructions are being thrown away when it branches back to the top of the checking loop. This means the loop always compares against the old value and this can result in a dead lock.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93028 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/2010-01-08-Atomic64Bug.ll [new file with mode: 0644]