Use set_val_label before every def_var

This commit is contained in:
bjorn3 2019-11-15 21:07:54 +01:00
parent 0244d19ebb
commit ab7ad2caeb
2 changed files with 3 additions and 0 deletions

View File

@ -625,6 +625,7 @@ pub fn codegen_intrinsic_call<'tcx>(
}
_ => panic!("clif_type returned {}", clif_ty),
};
fx.bcx.set_val_label(val, cranelift::codegen::ir::ValueLabel::from_u32(var.as_u32()));
fx.bcx.def_var(mir_var(var), val);
}
_ => {
@ -656,6 +657,7 @@ pub fn codegen_intrinsic_call<'tcx>(
}
_ => panic!("clif_type returned {}", clif_ty),
};
fx.bcx.set_val_label(val, cranelift::codegen::ir::ValueLabel::from_u32(var.as_u32()));
fx.bcx.def_var(mir_var(var), val);
}
CPlaceInner::Addr(_, _) | CPlaceInner::Stack(_) => {

View File

@ -423,6 +423,7 @@ fn assert_assignable<'tcx>(
let addr = match self.inner {
CPlaceInner::Var(var) => {
let data = from.load_scalar(fx);
fx.bcx.set_val_label(data, cranelift::codegen::ir::ValueLabel::from_u32(var.as_u32()));
fx.bcx.def_var(mir_var(var), data);
return;
}