blob: 3b7ea25ad46eb0f4fc3a42c12faf7ad828ed1253 [file] [log] [blame]
// unit-test: GVN
// EMIT_MIR boolean_identities.test.GVN.diff
pub fn test(x: bool, y: bool) -> bool {
// CHECK-LABEL: fn test(
// CHECK: debug a => [[a:_.*]];
// CHECK: debug b => [[b:_.*]];
// CHECK: [[a]] = const true;
// CHECK: [[b]] = const false;
// CHECK: _0 = const false;
let a = (y | true);
let b = (x & false);
a & b
}
fn main() {
test(true, false);
}