From 577fea4e1a13319adf2b660f57bf570195a7f78d Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 28 May 2021 15:32:36 -0700 Subject: [PATCH] [CGAtomic] Delete outdated code comparing success/failure ordering for cmpxchg. 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 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/clang/lib/CodeGen/CGAtomic.cpp b/clang/lib/CodeGen/CGAtomic.cpp index cc85375..e5c5e5b 100644 --- a/clang/lib/CodeGen/CGAtomic.cpp +++ b/clang/lib/CodeGen/CGAtomic.cpp @@ -1730,11 +1730,6 @@ AtomicInfo::EmitAtomicCompareExchangeLibcall(llvm::Value *ExpectedAddr, std::pair 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. -- 2.7.4