about summary refs log tree commit diff
path: root/tests/mir-opt/pre-codegen/derived_ord_debug.{impl#0}-partial_cmp.PreCodegen.after.panic-abort.mir
blob: 9fc8da3a11204a83384a1d4af2f8896b25ca1d29 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// MIR for `<impl at $DIR/derived_ord_debug.rs:6:10: 6:20>::partial_cmp` after PreCodegen

fn <impl at $DIR/derived_ord_debug.rs:6:10: 6:20>::partial_cmp(_1: &MultiField, _2: &MultiField) -> Option<std::cmp::Ordering> {
    debug self => _1;
    debug other => _2;
    let mut _0: std::option::Option<std::cmp::Ordering>;
    let _3: &char;
    let _4: &char;
    let mut _5: std::option::Option<std::cmp::Ordering>;
    let mut _6: isize;
    let mut _7: i8;
    let _8: &i16;
    let _9: &i16;
    scope 1 {
        debug cmp => _5;
    }

    bb0: {
        _3 = &((*_1).0: char);
        _4 = &((*_2).0: char);
        _5 = <char as PartialOrd>::partial_cmp(copy _3, copy _4) -> [return: bb1, unwind unreachable];
    }

    bb1: {
        _6 = discriminant(_5);
        switchInt(move _6) -> [1: bb2, 0: bb4, otherwise: bb6];
    }

    bb2: {
        _7 = discriminant(((_5 as Some).0: std::cmp::Ordering));
        switchInt(move _7) -> [0: bb3, otherwise: bb4];
    }

    bb3: {
        _8 = &((*_1).1: i16);
        _9 = &((*_2).1: i16);
        _0 = <i16 as PartialOrd>::partial_cmp(copy _8, copy _9) -> [return: bb5, unwind unreachable];
    }

    bb4: {
        _0 = copy _5;
        goto -> bb5;
    }

    bb5: {
        return;
    }

    bb6: {
        unreachable;
    }
}