diff --git a/llvm/lib/Transforms/Utils/LibCallsShrinkWrap.cpp b/llvm/lib/Transforms/Utils/LibCallsShrinkWrap.cpp index 6220f85093096..9fe655e548c22 100644 --- a/llvm/lib/Transforms/Utils/LibCallsShrinkWrap.cpp +++ b/llvm/lib/Transforms/Utils/LibCallsShrinkWrap.cpp @@ -467,7 +467,7 @@ Value *LibCallsShrinkWrap::generateCondForPow(CallInst *CI, void LibCallsShrinkWrap::shrinkWrapCI(CallInst *CI, Value *Cond) { assert(Cond != nullptr && "ShrinkWrapCI is not expecting an empty call inst"); MDNode *BranchWeights = - MDBuilder(CI->getContext()).createBranchWeights(1, 2000); + MDBuilder(CI->getContext()).createUnlikelyBranchWeights(); Instruction *NewInst = SplitBlockAndInsertIfThen(Cond, CI, false, BranchWeights, &DTU); diff --git a/llvm/test/Transforms/Util/libcalls-shrinkwrap-double.ll b/llvm/test/Transforms/Util/libcalls-shrinkwrap-double.ll index 1866fc98fc8d8..4ac216f85c74c 100644 --- a/llvm/test/Transforms/Util/libcalls-shrinkwrap-double.ll +++ b/llvm/test/Transforms/Util/libcalls-shrinkwrap-double.ll @@ -448,4 +448,4 @@ define void @test_pow_strictfp(i32 %int_val, double %exp) strictfp { declare double @pow(double, double) -; CHECK: ![[BRANCH_WEIGHT]] = !{!"branch_weights", i32 1, i32 2000} +; CHECK: ![[BRANCH_WEIGHT]] = !{!"branch_weights", i32 1, i32 1048575} diff --git a/llvm/test/Transforms/Util/libcalls-shrinkwrap-float.ll b/llvm/test/Transforms/Util/libcalls-shrinkwrap-float.ll index 2a08041e2b1e5..f4dc79759d17e 100644 --- a/llvm/test/Transforms/Util/libcalls-shrinkwrap-float.ll +++ b/llvm/test/Transforms/Util/libcalls-shrinkwrap-float.ll @@ -350,4 +350,4 @@ declare float @log2f(float) declare float @logbf(float) declare float @log1pf(float) -; CHECK: ![[BRANCH_WEIGHT]] = !{!"branch_weights", i32 1, i32 2000} +; CHECK: ![[BRANCH_WEIGHT]] = !{!"branch_weights", i32 1, i32 1048575} diff --git a/llvm/test/Transforms/Util/libcalls-shrinkwrap-long-double.ll b/llvm/test/Transforms/Util/libcalls-shrinkwrap-long-double.ll index 076e958086daa..c2b981c81c75d 100644 --- a/llvm/test/Transforms/Util/libcalls-shrinkwrap-long-double.ll +++ b/llvm/test/Transforms/Util/libcalls-shrinkwrap-long-double.ll @@ -351,4 +351,4 @@ declare x86_fp80 @log2l(x86_fp80) declare x86_fp80 @logbl(x86_fp80) declare x86_fp80 @log1pl(x86_fp80) -; CHECK: ![[BRANCH_WEIGHT]] = !{!"branch_weights", i32 1, i32 2000} +; CHECK: ![[BRANCH_WEIGHT]] = !{!"branch_weights", i32 1, i32 1048575}