forked from OSchip/llvm-project
[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
This commit is contained in:
parent
2a4c1f3e5b
commit
a64de6720b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue