diff options
author | Diana Picus <diana.picus@linaro.org> | 2017-02-20 14:45:58 +0000 |
---|---|---|
committer | Diana Picus <diana.picus@linaro.org> | 2017-02-20 14:45:58 +0000 |
commit | 1c33c9f0b0d804edf76c359c94417aaefedbc9e9 (patch) | |
tree | 5e593927f8ba4570c1c88c7005e28489ec7068a2 /llvm/lib/Target/ARM/ARMInstructionSelector.cpp | |
parent | b41ce2b392c6e267bed8c00b4ac39aa0d4e2c8ea (diff) | |
download | bcm5719-llvm-1c33c9f0b0d804edf76c359c94417aaefedbc9e9.tar.gz bcm5719-llvm-1c33c9f0b0d804edf76c359c94417aaefedbc9e9.zip |
[ARM] GlobalISel: Don't select atomic loads
There used to be a check in the IRTranslator that prevented us from having to
deal with atomic loads/stores. That check has been removed in r294993 and the
AArch64 backend was updated accordingly. This commit does the same thing for the
ARM backend.
In general, in the ARM backend we introduce fences during the atomic expand
pass, so we don't have to worry about atomics, *except* for the 32-bit ARMv8
target, which handles atomics more like AArch64. Since we don't want to worry
about that yet, just bail out of instruction selection if we find any atomic
loads.
llvm-svn: 295662
Diffstat (limited to 'llvm/lib/Target/ARM/ARMInstructionSelector.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMInstructionSelector.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstructionSelector.cpp b/llvm/lib/Target/ARM/ARMInstructionSelector.cpp index 75b108cddfa..84d9ac55361 100644 --- a/llvm/lib/Target/ARM/ARMInstructionSelector.cpp +++ b/llvm/lib/Target/ARM/ARMInstructionSelector.cpp @@ -310,6 +310,12 @@ bool ARMInstructionSelector::select(MachineInstr &I) const { MIB.addImm(0).add(predOps(ARMCC::AL)).add(condCodeOp()); break; case G_LOAD: { + const auto &MemOp = **I.memoperands_begin(); + if (MemOp.getOrdering() != AtomicOrdering::NotAtomic) { + DEBUG(dbgs() << "Atomic load/store not supported yet\n"); + return false; + } + unsigned Reg = I.getOperand(0).getReg(); unsigned RegBank = RBI.getRegBank(Reg, MRI, TRI)->getID(); |