From bb2bf3a2635a06de1c5ba15056dc5787ae2e81b0 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 10 Jun 2024 15:19:36 -0700 Subject: [NFCI][metadata][clang] Use create{Unlikely,Likely}BranchWeights (#89467) It does not look like particular value is inportant. Howere, there is a comment., but the current implementation of `create{Unlikely,Likely}BranchWeights` use the same value. Follow up to #89464 --- clang/lib/CodeGen/CGExprComplex.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CGExprComplex.cpp') diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index 9ef73e36f66f..f19334489a0b 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/lib/CodeGen/CGExprComplex.cpp @@ -856,8 +856,7 @@ ComplexPairTy ComplexExprEmitter::EmitBinMul(const BinOpInfo &Op) { llvm::BasicBlock *OrigBB = Branch->getParent(); // Give hint that we very much don't expect to see NaNs. - // Value chosen to match UR_NONTAKEN_WEIGHT, see BranchProbabilityInfo.cpp - llvm::MDNode *BrWeight = MDHelper.createBranchWeights(1, (1U << 20) - 1); + llvm::MDNode *BrWeight = MDHelper.createUnlikelyBranchWeights(); Branch->setMetadata(llvm::LLVMContext::MD_prof, BrWeight); // Now test the imaginary part and create its branch. -- cgit v1.2.3