diff --git a/llvm/lib/CodeGen/AtomicExpandPass.cpp b/llvm/lib/CodeGen/AtomicExpandPass.cpp index bd62b1646c761..d9bc042d6807e 100644 --- a/llvm/lib/CodeGen/AtomicExpandPass.cpp +++ b/llvm/lib/CodeGen/AtomicExpandPass.cpp @@ -1691,7 +1691,7 @@ Value *AtomicExpandImpl::insertRMWCmpXchgLoop( // Atomic RMW expands to a cmpxchg loop, Since precise branch weights // cannot be easily determined here, we mark the branch as "unknown" (50/50) // to prevent misleading optimizations. - setExplicitlyUnknownBranchWeightsIfProfiled(*CondBr, *F, DEBUG_TYPE); + setExplicitlyUnknownBranchWeightsIfProfiled(*CondBr, DEBUG_TYPE); Builder.SetInsertPoint(ExitBB, ExitBB->begin()); return NewLoaded;