1
Fork 0

Don't drop Rvalue::WrapUnsafeBinder during GVN

This commit is contained in:
Michael Goulet 2025-03-11 16:05:34 +00:00
parent 4d30011f6c
commit 13134dd096
4 changed files with 102 additions and 2 deletions

View file

@ -872,8 +872,14 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
self.simplify_place_projection(place, location);
return self.new_pointer(*place, AddressKind::Address(mutbl));
}
Rvalue::WrapUnsafeBinder(ref mut op, _) => {
return self.simplify_operand(op, location);
Rvalue::WrapUnsafeBinder(ref mut op, ty) => {
let value = self.simplify_operand(op, location)?;
Value::Cast {
kind: CastKind::Transmute,
value,
from: op.ty(self.local_decls, self.tcx),
to: ty,
}
}
// Operations.