[llvm] [ProfCheck][NFC] fix argument order for call to setExplicitlyUnknownBranchWeightsIfProfiled (PR #166601)

Tim Gymnich via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 5 10:03:07 PST 2025


https://github.com/tgymnich updated https://github.com/llvm/llvm-project/pull/166601

>From 3d6277af3bfc670217ec561126401f145464239c Mon Sep 17 00:00:00 2001
From: Tim Gymnich <tim at gymni.ch>
Date: Wed, 5 Nov 2025 17:54:05 +0000
Subject: [PATCH] [ProfCheck][NFC] fix argument order for call to
 setExplicitlyUnknownBranchWeightsIfProfiled

---
 llvm/lib/CodeGen/AtomicExpandPass.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/CodeGen/AtomicExpandPass.cpp b/llvm/lib/CodeGen/AtomicExpandPass.cpp
index bd62b1646c761..fde1c1d756be9 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, *F);
 
   Builder.SetInsertPoint(ExitBB, ExitBB->begin());
   return NewLoaded;



More information about the llvm-commits mailing list