Add assertions for matches that used to use analyze_branch (#5733)
Following up from #5730, add debug assertions to ensure that new branch instructions don't slip through matches that used to use analyze_branch.
This commit is contained in:
@@ -372,7 +372,7 @@ impl DominatorTree {
|
|||||||
}
|
}
|
||||||
self.push_if_unseen(*dest);
|
self.push_if_unseen(*dest);
|
||||||
}
|
}
|
||||||
_ => {}
|
inst => debug_assert!(!inst.opcode().is_branch()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ impl ControlFlowGraph {
|
|||||||
self.add_edge(block, inst, *dest);
|
self.add_edge(block, inst, *dest);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {}
|
inst => debug_assert!(!inst.opcode().is_branch()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ pub(crate) fn visit_block_succs<F: FnMut(Inst, Block, bool)>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_ => {}
|
inst => debug_assert!(!inst.opcode().is_branch()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ impl FunctionStencil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_ => {}
|
inst => debug_assert!(!inst.opcode().is_branch()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1358,7 +1358,7 @@ impl<'a> Verifier<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {}
|
inst => debug_assert!(!inst.opcode().is_branch()),
|
||||||
}
|
}
|
||||||
|
|
||||||
match self.func.dfg.insts[inst].analyze_call(&self.func.dfg.value_lists) {
|
match self.func.dfg.insts[inst].analyze_call(&self.func.dfg.value_lists) {
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ impl<'short, 'long> InstBuilderBase<'short> for FuncInstBuilder<'short, 'long> {
|
|||||||
self.builder.declare_successor(*destination, inst);
|
self.builder.declare_successor(*destination, inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
_ => {}
|
inst => debug_assert!(!inst.opcode().is_branch()),
|
||||||
}
|
}
|
||||||
|
|
||||||
if data.opcode().is_terminator() {
|
if data.opcode().is_terminator() {
|
||||||
|
|||||||
Reference in New Issue
Block a user