[PATCH] D90106: [JumpThreading] Set edge probabilities when creating basic blocks
Anna Thomas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 3 10:34:25 PST 2020
anna added subscribers: yrouban, anna.
anna added a comment.
Hi, just wanted to point out - We have seen some assertion failures in multiple benchmarks downstream with this patch (or a related one built on this patch). Trying to revert this downstream shows there are dependent patches. Is this assertion seen and already fixed in trunk?
Assertion failure is `BranchProbabilityInfo.cpp:1163: void llvm::BranchProbabilityInfo::setEdgeProbability(const llvm::BasicBlock*, const llvm::SmallVectorImpl&): Assertion `TotalNumerator <= BranchProbability::getDenominator() + Probs.size()'
@yrouban narrowed it down to:
"Debugging showed that the assertion detects incorrect set of probabilities (summ != 1.0) when they are copied from PredBB to NewBB in JumpThreadingPass::ThreadThroughTwoBasicBlocks(). The probabilities are corrupted in PredBB when it gets cloned instructions from its successor in JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred(). So the bug is in this method which does not fix the probabilities. "
He is working on a fix for this with upstream testcase.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90106/new/
https://reviews.llvm.org/D90106
More information about the llvm-commits
mailing list