diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -340,7 +340,7 @@ BFI.reset(new BlockFrequencyInfo(F, *BPI, LI)); } - bool Changed = runImpl(F, &TLI, &LVI, &AA, &DTU, HasProfileData, + bool Changed = runImpl(F, &TLI, &LVI, &AA, &DTU, F.hasProfileData(), std::move(BFI), std::move(BPI)); if (!Changed) diff --git a/llvm/test/Transforms/JumpThreading/update-edge-weight.ll b/llvm/test/Transforms/JumpThreading/update-edge-weight.ll --- a/llvm/test/Transforms/JumpThreading/update-edge-weight.ll +++ b/llvm/test/Transforms/JumpThreading/update-edge-weight.ll @@ -1,4 +1,5 @@ ; RUN: opt -S -jump-threading %s | FileCheck %s +; RUN: opt -S -passes=jump-threading %s | FileCheck %s ; Test if edge weights are properly updated after jump threading.