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.


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to