We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8eecb6 commit 9e9afc2Copy full SHA for 9e9afc2
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -7449,7 +7449,10 @@ template <> struct DenseMapInfo<const SwitchInst::CaseHandle *> {
7449
}
7450
static unsigned getHashValue(const SwitchInst::CaseHandle *Case) {
7451
BasicBlock *Succ = Case->getCaseSuccessor();
7452
- return hash_combine(Succ->size(), Succ->getTerminator()->getOpcode());
+ BranchInst *BI = cast<BranchInst>(Succ->getTerminator());
7453
+
7454
+ auto It = BI->successors();
7455
+ return hash_combine(Succ->size(), hash_combine_range(It.begin(), It.end()));
7456
7457
static bool isEqual(const SwitchInst::CaseHandle *LHS,
7458
const SwitchInst::CaseHandle *RHS) {
0 commit comments