3 #![feature(custom_mir, core_intrinsics)]
4 #![allow(unused_assignments)]
6 use core::intrinsics::mir::*;
8 fn opaque(_: impl Sized) -> bool { true }
10 fn cmp_ref(a: &u8, b: &u8) -> bool {
11 std::ptr::eq(a as *const u8, b as *const u8)
14 #[custom_mir(dialect = "analysis", phase = "post-cleanup")]
21 // We cannot propagate the place `a`.
23 Call(RET, next, cmp_ref(r1, r2))
26 // But we can propagate the value `a`.
27 Call(RET, ret, opaque(b))
39 // EMIT_MIR borrowed_local.f.CopyProp.diff