Skip to content

Commit 9143422

Browse files
xguptaxgupta
authored andcommitted
fix the assertion failure in select.ll test case
1 parent c30bfb6 commit 9143422

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/Transforms/Scalar/JumpThreading.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2380,7 +2380,10 @@ void JumpThreadingPass::threadEdge(BasicBlock *BB,
23802380
// Build BPI/BFI before any changes are made to IR.
23812381
bool HasProfile = doesBlockHaveProfileData(BB);
23822382
auto *BFI = getOrCreateBFI(HasProfile);
2383-
auto *BPI = getOrCreateBPI(BFI != nullptr);
2383+
BranchProbabilityInfo *BPI = nullptr;
2384+
if (BFI) {
2385+
BPI = getOrCreateBPI(true);
2386+
}
23842387

23852388
// And finally, do it! Start by factoring the predecessors if needed.
23862389
BasicBlock *PredBB;

0 commit comments

Comments
 (0)