summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/building/enum_cast.offsetty.built.after.mir
blob: 7b2b583f20fb9cd669b84c4f2fc29b71199f4ead (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
// MIR for `offsetty` after built

fn offsetty(_1: NotStartingAtZero) -> u32 {
    debug x => _1;                       // in scope 0 at $DIR/enum_cast.rs:+0:13: +0:14
    let mut _0: u32;                     // return place in scope 0 at $DIR/enum_cast.rs:+0:38: +0:41
    let _2: NotStartingAtZero;           // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:6
    let mut _3: isize;                   // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:6
    let mut _4: u8;                      // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
    let mut _5: bool;                    // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
    let mut _6: bool;                    // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
    let mut _7: bool;                    // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:13

    bb0: {
        StorageLive(_2);                 // scope 0 at $DIR/enum_cast.rs:+1:5: +1:6
        _2 = move _1;                    // scope 0 at $DIR/enum_cast.rs:+1:5: +1:6
        _3 = discriminant(_2);           // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
        _4 = _3 as u8 (IntToInt);        // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
        _5 = Ge(_4, const 4_u8);         // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
        _6 = Le(_4, const 8_u8);         // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
        _7 = BitAnd(move _5, move _6);   // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
        assume(move _7);                 // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
        _0 = move _3 as u32 (IntToInt);  // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
        StorageDead(_2);                 // scope 0 at $DIR/enum_cast.rs:+1:12: +1:13
        return;                          // scope 0 at $DIR/enum_cast.rs:+2:2: +2:2
    }
}