From 82029753c1132f30644260e94e02c61785559730 Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Mon, 25 Feb 2019 17:36:10 +0000 Subject: [PATCH] [Lanai] Be super conservative about atomics As requested during review of D57601 , be equally conservative for atomic MMOs as for volatile MMOs in all in tree backends. At the moment, all atomic MMOs are also volatile, but I'm about to change that. Reviewed as part of https://reviews.llvm.org/D58490, with other backends still pending review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354800 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Lanai/LanaiMemAluCombiner.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Target/Lanai/LanaiMemAluCombiner.cpp b/lib/Target/Lanai/LanaiMemAluCombiner.cpp index ed5b6c4fd4a..a69dcddfc25 100644 --- a/lib/Target/Lanai/LanaiMemAluCombiner.cpp +++ b/lib/Target/Lanai/LanaiMemAluCombiner.cpp @@ -158,7 +158,8 @@ bool isNonVolatileMemoryOp(const MachineInstr &MI) { const MachineMemOperand *MemOperand = *MI.memoperands_begin(); // Don't move volatile memory accesses - if (MemOperand->isVolatile()) + // TODO: unclear if we need to be as conservative about atomics + if (MemOperand->isVolatile() || MemOperand->isAtomic()) return false; return true; -- 2.50.1