Skip to content

Commit 577fea4

Browse files
committed
[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.
1 parent 2644399 commit 577fea4

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

clang/lib/CodeGen/CGAtomic.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,11 +1730,6 @@ AtomicInfo::EmitAtomicCompareExchangeLibcall(llvm::Value *ExpectedAddr,
17301730
std::pair<RValue, llvm::Value *> AtomicInfo::EmitAtomicCompareExchange(
17311731
RValue Expected, RValue Desired, llvm::AtomicOrdering Success,
17321732
llvm::AtomicOrdering Failure, bool IsWeak) {
1733-
if (isStrongerThan(Failure, Success))
1734-
// Don't assert on undefined behavior "failure argument shall be no stronger
1735-
// than the success argument".
1736-
Failure = llvm::AtomicCmpXchgInst::getStrongestFailureOrdering(Success);
1737-
17381733
// Check whether we should use a library call.
17391734
if (shouldUseLibcall()) {
17401735
// Produce a source address.

0 commit comments

Comments
 (0)