summaryrefslogtreecommitdiff
path: root/tests/mir-opt/equal_true.rs
blob: 717d10c6d76276bcd506881dc409a6aae251fab9 (plain)
1
2
3
4
5
6
7
8
9
10
11
// unit-test InstCombine

// EMIT_MIR equal_true.opt.InstCombine.diff

fn opt(x: bool) -> i32 {
    if x == true { 0 } else { 1 }
}

fn main() {
    opt(true);
}