Index: llvm/lib/CodeGen/AtomicExpandPass.cpp =================================================================== --- llvm/lib/CodeGen/AtomicExpandPass.cpp +++ llvm/lib/CodeGen/AtomicExpandPass.cpp @@ -1447,8 +1447,10 @@ default: llvm_unreachable("Unhandled case in tryExpandAtomicCmpXchg"); case TargetLoweringBase::AtomicExpansionKind::None: - if (ValueSize < MinCASSize) + if (ValueSize < MinCASSize) { expandPartwordCmpXchg(CI); + return true; + } return false; case TargetLoweringBase::AtomicExpansionKind::LLSC: { return expandAtomicCmpXchg(CI);