summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
blob: bc04790028d37eec387bb7216d92c0e4e5fa3ff9 (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
53
54
55
// MIR for `main` after SimplifyCfg-elaborate-drops

fn main() -> () {
    let mut _0: ();
    let mut _1: Packed;
    let mut _2: Aligned;
    let mut _3: Droppy;
    let mut _4: Aligned;
    let mut _5: Droppy;
    let mut _6: Aligned;
    scope 1 {
        debug x => _1;
    }

    bb0: {
        StorageLive(_1);
        StorageLive(_2);
        StorageLive(_3);
        _3 = Droppy(const 0_usize);
        _2 = Aligned(move _3);
        StorageDead(_3);
        _1 = Packed(move _2);
        StorageDead(_2);
        StorageLive(_4);
        StorageLive(_5);
        _5 = Droppy(const 0_usize);
        _4 = Aligned(move _5);
        StorageDead(_5);
        StorageLive(_6);
        _6 = move (_1.0: Aligned);
        drop(_6) -> [return: bb4, unwind: bb1];
    }

    bb1 (cleanup): {
        (_1.0: Aligned) = move _4;
        drop(_1) -> [return: bb3, unwind terminate];
    }

    bb2: {
        StorageDead(_1);
        return;
    }

    bb3 (cleanup): {
        resume;
    }

    bb4: {
        StorageDead(_6);
        (_1.0: Aligned) = move _4;
        StorageDead(_4);
        _0 = const ();
        drop(_1) -> [return: bb2, unwind: bb3];
    }
}