3 #![feature(custom_mir, core_intrinsics)]
4 #![allow(unused_assignments)]
6 use core::intrinsics::mir::*;
8 #[custom_mir(dialect = "analysis", phase = "post-cleanup")]
9 fn f(c: bool) -> bool {
14 bb1 = { b = c; match b { false => bb3, _ => bb2 }}
15 // This assignment to `a` does not dominate the use in `bb3`.
16 // It should not be replaced by `b`.
17 bb2 = { a = b; c = false; Goto(bb1) }
18 bb3 = { RET = a; Return() }
23 assert_eq!(true, f(true));
26 // EMIT_MIR non_dominate.f.CopyProp.diff