[clang] 577fea4 - [CGAtomic] Delete outdated code comparing success/failure ordering for cmpxchg.
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Fri May 28 15:36:38 PDT 2021
Author: Eli Friedman
Date: 2021-05-28T15:36:01-07:00
New Revision: 577fea4e1a13319adf2b660f57bf570195a7f78d
URL: https://github.com/llvm/llvm-project/commit/577fea4e1a13319adf2b660f57bf570195a7f78d
DIFF: https://github.com/llvm/llvm-project/commit/577fea4e1a13319adf2b660f57bf570195a7f78d.diff
LOG: [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.
Added:
Modified:
clang/lib/CodeGen/CGAtomic.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGAtomic.cpp b/clang/lib/CodeGen/CGAtomic.cpp
index cc85375f08dd..e5c5e5babf23 100644
--- a/clang/lib/CodeGen/CGAtomic.cpp
+++ b/clang/lib/CodeGen/CGAtomic.cpp
@@ -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.
More information about the cfe-commits
mailing list