Check special-purpose type constraints that can't be expressed in the normal opcode constraints.
(&self, inst: Inst, errors: &mut VerifierErrors)
| 1766 | // Check special-purpose type constraints that can't be expressed in the normal opcode |
| 1767 | // constraints. |
| 1768 | fn typecheck_special(&self, inst: Inst, errors: &mut VerifierErrors) -> VerifierStepResult { |
| 1769 | match self.func.dfg.insts[inst] { |
| 1770 | ir::InstructionData::UnaryGlobalValue { global_value, .. } => { |
| 1771 | if let Some(isa) = self.isa { |
| 1772 | let inst_type = self.func.dfg.value_type(self.func.dfg.first_result(inst)); |
| 1773 | let global_type = self.func.global_values[global_value].global_type(isa); |
| 1774 | if inst_type != global_type { |
| 1775 | return errors.nonfatal(( |
| 1776 | inst, self.context(inst), |
| 1777 | format!( |
| 1778 | "global_value instruction with type {inst_type} references global value with type {global_type}" |
| 1779 | )), |
| 1780 | ); |
| 1781 | } |
| 1782 | } |
| 1783 | } |
| 1784 | _ => {} |
| 1785 | } |
| 1786 | Ok(()) |
| 1787 | } |
| 1788 | |
| 1789 | fn cfg_integrity( |
| 1790 | &self, |
no test coverage detected