diff --git a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp index ac033d92e30d8..d2d6c4926bfff 100644 --- a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp +++ b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp @@ -834,7 +834,7 @@ Instruction *ModuleSanitizerCoverage::CreateGateBranch(Function &F, // Set the branch weights in order to minimize the price paid when the // gate is turned off, allowing the default enablement of this // instrumentation with as little of a performance cost as possible - auto Weights = MDBuilder(*C).createBranchWeights(1, 100000); + auto Weights = MDBuilder(*C).createUnlikelyBranchWeights(); return SplitBlockAndInsertIfThen(FunctionGateCmp, IP, false, Weights); }