From a8ab1ceb39669521aab745c86de129a4e635fddd Mon Sep 17 00:00:00 2001 From: Scott McMurray Date: Sun, 16 Jun 2024 22:25:57 -0700 Subject: [PATCH] [GVN] Add tests for generic pointees with PtrMetadata --- core/src/intrinsics/mir.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/intrinsics/mir.rs b/core/src/intrinsics/mir.rs index ec8488009b96b..1daf1d723fb95 100644 --- a/core/src/intrinsics/mir.rs +++ b/core/src/intrinsics/mir.rs @@ -444,6 +444,13 @@ define!( /// generated via the normal `mem::transmute`. fn CastTransmute(operand: T) -> U ); +define!( + "mir_cast_ptr_to_ptr", + /// Emits a `CastKind::PtrToPtr` cast. + /// + /// This allows bypassing normal validation to generate strange casts. + fn CastPtrToPtr(operand: T) -> U +); define!( "mir_make_place", #[doc(hidden)]