[aarch64][globalisel] Define G_ATOMIC_CMPXCHG and G_ATOMICRMW_* and make them legal
authorDaniel Sanders <daniel_l_sanders@apple.com>
Tue, 28 Nov 2017 20:21:15 +0000 (20:21 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Tue, 28 Nov 2017 20:21:15 +0000 (20:21 +0000)
commit7fe7acc6b1b902d1e1207232e3ea31931dad73ab
tree7ae4408dab1fda3830ae865aa698a16987ce23d0
parent1d4b3023dc6ada3d82af12716f2a15320efae293
[aarch64][globalisel] Define G_ATOMIC_CMPXCHG and G_ATOMICRMW_* and make them legal

The IRTranslator cannot generate these instructions at the moment so there's no
issue with not having implemented ISel for them yet. D40092 will add
G_ATOMIC_CMPXCHG_WITH_SUCCESS and G_ATOMICRMW_* to the IRTranslator and a
further patch will add support for lowering G_ATOMIC_CMPXCHG_WITH_SUCCESS into
G_ATOMIC_CMPXCHG with an external success check via the `Lower` action.

The separation of G_ATOMIC_CMPXCHG_WITH_SUCCESS and G_ATOMIC_CMPXCHG is
to import SelectionDAG rules while still supporting targets that prefer to
custom lower the original LLVM-IR-like operation.

llvm-svn: 319216
llvm/include/llvm/CodeGen/TargetOpcodes.def
llvm/include/llvm/Target/GenericOpcodes.td
llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp
llvm/lib/Target/AArch64/AArch64LegalizerInfo.h
llvm/lib/Target/AArch64/AArch64Subtarget.cpp