X86: delegate expanding atomic libcalls to generic code.
authorTim Northover <tnorthover@apple.com>
Tue, 1 Jul 2014 21:44:59 +0000 (21:44 +0000)
committerTim Northover <tnorthover@apple.com>
Tue, 1 Jul 2014 21:44:59 +0000 (21:44 +0000)
commit99ec36c684bd658b564d7db50463917a754daaab
tree0b025c7343397d83469f82ea8f8220b376fe5d12
parent3ca3826528fdff4009d86185b1b373d6fc680e26
X86: delegate expanding atomic libcalls to generic code.

On targets without cmpxchg16b or cmpxchg8b, the borderline atomic
operations were slipping through the gaps.

X86AtomicExpand.cpp was delegating to ISelLowering. Generic
ISelLowering was delegating to X86ISelLowering and X86ISelLowering was
asserting. The correct behaviour is to expand to a libcall, preferably
in generic ISelLowering.

This can be achieved by X86ISelLowering deciding it doesn't want the
faff after all.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212134 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/atomic-ops-ancient-64.ll [new file with mode: 0644]