diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 4c80b7bfb0b..0b8e9caa09b 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -1291,8 +1291,10 @@ bool MachineInstr::hasOrderedMemoryRef() const { return true; // Check if any of our memory operands are ordered. + // TODO: This should probably be be isUnordered (see D57601), but the callers + // need audited and test cases written to be sure. return llvm::any_of(memoperands(), [](const MachineMemOperand *MMO) { - return !MMO->isUnordered(); + return MMO->isVolatile() || MMO->isAtomic(); }); } |