rust/src/test/mir-opt/const_prop/boolean_identities.rs

11 lines
200 B
Rust

// compile-flags: -O -Zmir-opt-level=3
// EMIT_MIR boolean_identities.test.ConstProp.diff
pub fn test(x: bool, y: bool) -> bool {
(y | true) & (x & false)
}
fn main() {
test(true, false);
}