diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index 0cb664907ec874..4250875dd8869f 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -340,7 +340,7 @@ PreservedAnalyses JumpThreadingPass::run(Function &F, 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 index 58cd71861d8a1b..e6a6093279de13 100644 --- 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.