summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Lanai
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2019-02-25 17:36:10 +0000
committerPhilip Reames <listmail@philipreames.com>2019-02-25 17:36:10 +0000
commita64de6720b5480d909371692bef31549b71f99a6 (patch)
tree40fe0072d624337182be786a45aed8c13be0945e /llvm/lib/Target/Lanai
parent2a4c1f3e5b288be816b6c41fb9c87d9e13625eab (diff)
downloadbcm5719-llvm-a64de6720b5480d909371692bef31549b71f99a6.tar.gz
bcm5719-llvm-a64de6720b5480d909371692bef31549b71f99a6.zip
[Lanai] Be super conservative about atomics
As requested during review of D57601 <https://reviews.llvm.org/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. llvm-svn: 354800
Diffstat (limited to 'llvm/lib/Target/Lanai')
-rw-r--r--llvm/lib/Target/Lanai/LanaiMemAluCombiner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/Lanai/LanaiMemAluCombiner.cpp b/llvm/lib/Target/Lanai/LanaiMemAluCombiner.cpp
index ed5b6c4fd4a..a69dcddfc25 100644
--- a/llvm/lib/Target/Lanai/LanaiMemAluCombiner.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud