Index: include/llvm/CodeGen/MachineMemOperand.h =================================================================== --- include/llvm/CodeGen/MachineMemOperand.h +++ include/llvm/CodeGen/MachineMemOperand.h @@ -202,18 +202,14 @@ return static_cast(AtomicInfo.SynchScope); } - /// Return the atomic ordering requirements for this memory operation. + /// Return the atomic ordering requirements for this memory operation. For + /// cmpxchg atomic operations, return the atomic ordering requirements when + /// store occurs. AtomicOrdering getOrdering() const { return static_cast(AtomicInfo.Ordering); } /// For cmpxchg atomic operations, return the atomic ordering requirements - /// when store occurs. - AtomicOrdering getSuccessOrdering() const { - return getOrdering(); - } - - /// For cmpxchg atomic operations, return the atomic ordering requirements /// when store does not occur. AtomicOrdering getFailureOrdering() const { return static_cast(AtomicInfo.FailureOrdering); Index: include/llvm/CodeGen/SelectionDAGNodes.h =================================================================== --- include/llvm/CodeGen/SelectionDAGNodes.h +++ include/llvm/CodeGen/SelectionDAGNodes.h @@ -1123,7 +1123,9 @@ /// Return the synchronization scope for this memory operation. SynchronizationScope getSynchScope() const { return MMO->getSynchScope(); } - /// Return the atomic ordering requirements for this memory operation. + /// Return the atomic ordering requirements for this memory operation. For + /// cmpxchg atomic operations, return the atomic ordering requirements when + /// store occurs. AtomicOrdering getOrdering() const { return MMO->getOrdering(); } /// Return the type of the in-memory value. @@ -1205,13 +1207,6 @@ } /// For cmpxchg atomic operations, return the atomic ordering requirements - /// when store occurs. - AtomicOrdering getSuccessOrdering() const { - assert(isCompareAndSwap() && "Must be cmpxchg operation"); - return MMO->getSuccessOrdering(); - } - - /// For cmpxchg atomic operations, return the atomic ordering requirements /// when store does not occur. AtomicOrdering getFailureOrdering() const { assert(isCompareAndSwap() && "Must be cmpxchg operation");