about summary refs log tree commit diff
path: root/tests/mir-opt/pre-codegen/option_bubble_debug.option_direct.PreCodegen.after.panic-unwind.mir
blob: b29662dfa613b5660ae88a14db7282d812b047fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// MIR for `option_direct` after PreCodegen

fn option_direct(_1: Option<u32>) -> Option<u32> {
    debug x => _1;
    let mut _0: std::option::Option<u32>;
    let mut _2: isize;
    let _3: u32;
    let mut _4: u32;
    scope 1 {
        debug x => _3;
    }

    bb0: {
        _2 = discriminant(_1);
        switchInt(move _2) -> [0: bb1, 1: bb2, otherwise: bb4];
    }

    bb1: {
        _0 = Option::<u32>::None;
        goto -> bb3;
    }

    bb2: {
        _3 = copy ((_1 as Some).0: u32);
        _4 = Not(copy _3);
        _0 = Option::<u32>::Some(move _4);
        goto -> bb3;
    }

    bb3: {
        return;
    }

    bb4: {
        unreachable;
    }
}