diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-09-07 02:23:42 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-09-07 02:23:42 +0000 |
commit | 981a010c095b8fb57422df6fb90b6d802082afc5 (patch) | |
tree | 144379b0acab29ba55ce76e76a3b593d0c294265 /include/llvm/CodeGen | |
parent | 08708c8ef3185058ef879a977f580996b83b75ea (diff) | |
download | llvm-981a010c095b8fb57422df6fb90b6d802082afc5.tar.gz llvm-981a010c095b8fb57422df6fb90b6d802082afc5.tar.bz2 llvm-981a010c095b8fb57422df6fb90b6d802082afc5.tar.xz |
Relax the MemOperands on atomics a bit. Fixes -verify-machineinstrs failures for atomic laod/store on ARM.
(The fix for the related failures on x86 is going to be nastier because we actually need Acquire memoperands attached to the atomic load instrs, etc.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 2ecdc9a48c..6c7be69b4d 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -998,8 +998,10 @@ class AtomicSDNode : public MemSDNode { assert(getOrdering() == Ordering && "Ordering encoding error!"); assert(getSynchScope() == SynchScope && "Synch-scope encoding error!"); - assert(readMem() && "Atomic MachineMemOperand is not a load!"); - assert(writeMem() && "Atomic MachineMemOperand is not a store!"); + assert((readMem() || getOrdering() <= Monotonic) && + "Acquire/Release MachineMemOperand must be a load!"); + assert((writeMem() || getOrdering() <= Monotonic) && + "Acquire/Release MachineMemOperand must be a store!"); } public: |