(
&self,
loc_inst: Inst,
v: Value,
errors: &mut VerifierErrors,
)
| 1093 | } |
| 1094 | |
| 1095 | fn verify_inst_result( |
| 1096 | &self, |
| 1097 | loc_inst: Inst, |
| 1098 | v: Value, |
| 1099 | errors: &mut VerifierErrors, |
| 1100 | ) -> VerifierStepResult { |
| 1101 | self.verify_value(loc_inst, v, errors)?; |
| 1102 | |
| 1103 | match self.func.dfg.value_def(v) { |
| 1104 | ValueDef::Result(def_inst, _) => { |
| 1105 | if def_inst != loc_inst { |
| 1106 | errors.fatal(( |
| 1107 | loc_inst, |
| 1108 | self.context(loc_inst), |
| 1109 | format!("instruction result {v} is not defined by the instruction"), |
| 1110 | )) |
| 1111 | } else { |
| 1112 | Ok(()) |
| 1113 | } |
| 1114 | } |
| 1115 | ValueDef::Param(_, _) => errors.fatal(( |
| 1116 | loc_inst, |
| 1117 | self.context(loc_inst), |
| 1118 | format!("instruction result {v} is not defined by the instruction"), |
| 1119 | )), |
| 1120 | ValueDef::Union(_, _) => errors.fatal(( |
| 1121 | loc_inst, |
| 1122 | self.context(loc_inst), |
| 1123 | format!("instruction result {v} is a union node"), |
| 1124 | )), |
| 1125 | } |
| 1126 | } |
| 1127 | |
| 1128 | fn verify_bitcast( |
| 1129 | &self, |
no test coverage detected