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

// EMIT_MIR equal_true.opt.InstSimplify.diff

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

fn main() {
    opt(true);
}