1
Fork 0

Split gvn wide ptr tests.

This commit is contained in:
Camille GILLOT 2023-12-30 23:37:50 +00:00
parent 28df0a62f6
commit 5a6f14c4f4
8 changed files with 894 additions and 799 deletions

View file

@ -1046,6 +1046,9 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
let mut from = operand.ty(self.local_decls, self.tcx);
let mut value = self.simplify_operand(operand, location)?;
if from == to {
return Some(value);
}
if let CastKind::PointerCoercion(ReifyFnPointer | ClosureFnPointer(_)) = kind {
// Each reification of a generic fn may get a different pointer.