[CGAtomic] Delete outdated code comparing success/failure ordering for cmpxchg.
authorEli Friedman <efriedma@quicinc.com>
Fri, 28 May 2021 22:32:36 +0000 (15:32 -0700)
committerEli Friedman <efriedma@quicinc.com>
Fri, 28 May 2021 22:36:01 +0000 (15:36 -0700)
This doesn't actually have any effect: we only call this code with
SequentiallyConsistent orderings.  But delete it anyway for consistency
with other recent changes.

clang/lib/CodeGen/CGAtomic.cpp

index cc85375..e5c5e5b 100644 (file)
@@ -1730,11 +1730,6 @@ AtomicInfo::EmitAtomicCompareExchangeLibcall(llvm::Value *ExpectedAddr,
 std::pair<RValue, llvm::Value *> AtomicInfo::EmitAtomicCompareExchange(
     RValue Expected, RValue Desired, llvm::AtomicOrdering Success,
     llvm::AtomicOrdering Failure, bool IsWeak) {
-  if (isStrongerThan(Failure, Success))
-    // Don't assert on undefined behavior "failure argument shall be no stronger
-    // than the success argument".
-    Failure = llvm::AtomicCmpXchgInst::getStrongestFailureOrdering(Success);
-
   // Check whether we should use a library call.
   if (shouldUseLibcall()) {
     // Produce a source address.