From f2393b8f277318da8678d549f14082e9510c1d93 Mon Sep 17 00:00:00 2001 From: kevaundray Date: Tue, 11 Apr 2023 17:52:11 +0100 Subject: [PATCH] Removes debug assertion that was related to issue 796 (#6175) * fix typo: behaviour -> behavior * remove debug assertion since 796 has been merged * Update data_value.rs --- cranelift/codegen/src/cursor.rs | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/cranelift/codegen/src/cursor.rs b/cranelift/codegen/src/cursor.rs index 3de1b2166d..1a09d6f376 100644 --- a/cranelift/codegen/src/cursor.rs +++ b/cranelift/codegen/src/cursor.rs @@ -635,28 +635,6 @@ impl<'c, 'f> ir::InstInserterBase<'c> for &'c mut FuncCursor<'f> { } fn insert_built_inst(self, inst: ir::Inst) -> &'c mut ir::DataFlowGraph { - // TODO: Remove this assertion once #796 is fixed. - #[cfg(debug_assertions)] - { - if let CursorPosition::At(_) = self.position() { - if let Some(curr) = self.current_inst() { - if let Some(prev) = self.layout().prev_inst(curr) { - let prev_op = self.data_flow_graph().insts[prev].opcode(); - let inst_op = self.data_flow_graph().insts[inst].opcode(); - let curr_op = self.data_flow_graph().insts[curr].opcode(); - if prev_op.is_branch() - && !prev_op.is_terminator() - && !inst_op.is_terminator() - { - panic!( - "Inserting instruction {} after {}, and before {}", - inst_op, prev_op, curr_op - ) - } - }; - }; - }; - } self.insert_inst(inst); if !self.srcloc.is_default() { self.func.set_srcloc(inst, self.srcloc);