Don't drop Rvalue::WrapUnsafeBinder during GVN
This commit is contained in:
parent
4d30011f6c
commit
13134dd096
4 changed files with 102 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue