summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir
blob: b193a8d76fcba0ad10bebe883398c774781c7864 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
// MIR for `full_tested_match` after PromoteTemps

fn full_tested_match() -> () {
    let mut _0: ();                      // return place in scope 0 at $DIR/match_false_edges.rs:+0:28: +0:28
    let mut _1: (i32, i32);              // in scope 0 at $DIR/match_false_edges.rs:+1:13: +5:6
    let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
    let mut _3: isize;                   // in scope 0 at $DIR/match_false_edges.rs:+2:9: +2:16
    let mut _4: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
    let _5: i32;                         // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
    let _6: &i32;                        // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
    let mut _7: bool;                    // in scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
    let mut _8: i32;                     // in scope 0 at $DIR/match_false_edges.rs:+2:35: +2:36
    let _9: i32;                         // in scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
    let mut _10: i32;                    // in scope 0 at $DIR/match_false_edges.rs:+3:24: +3:25
    let mut _11: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
    scope 1 {
    }
    scope 2 {
        debug x => _5;                   // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:15
        debug x => _6;                   // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:15
    }
    scope 3 {
        debug y => _9;                   // in scope 3 at $DIR/match_false_edges.rs:+3:14: +3:15
    }

    bb0: {
        StorageLive(_1);                 // scope 0 at $DIR/match_false_edges.rs:+1:13: +5:6
        StorageLive(_2);                 // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
        _2 = Option::<i32>::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
        FakeRead(ForMatchedPlace(None), _2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
        _3 = discriminant(_2);           // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
        switchInt(move _3) -> [0_isize: bb1, 1_isize: bb2, otherwise: bb4]; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:27
    }

    bb1: {
        _1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:+4:17: +4:23
        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+4:17: +4:23
    }

    bb2: {
        falseEdge -> [real: bb5, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+2:9: +2:16
    }

    bb3: {
        falseEdge -> [real: bb9, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:16
    }

    bb4: {
        unreachable;                     // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
    }

    bb5: {
        StorageLive(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
        _11 = const _;                   // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
                                         // mir::Constant
                                         // + span: $DIR/match_false_edges.rs:14:14: 14:15
                                         // + literal: Const { ty: &Option<i32>, val: Unevaluated(full_tested_match, [], Some(promoted[0])) }
        _6 = &(((*_11) as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
        _4 = &shallow _2;                // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
        StorageLive(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
        _7 = guard() -> [return: bb6, unwind: bb11]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
                                         // mir::Constant
                                         // + span: $DIR/match_false_edges.rs:14:20: 14:25
                                         // + literal: Const { ty: fn() -> bool {guard}, val: Value(<ZST>) }
    }

    bb6: {
        switchInt(move _7) -> [false: bb8, otherwise: bb7]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
    }

    bb7: {
        StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
        FakeRead(ForMatchGuard, _4);     // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
        FakeRead(ForGuardBinding, _6);   // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
        StorageLive(_5);                 // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
        _5 = ((_2 as Some).0: i32);      // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
        StorageLive(_8);                 // scope 2 at $DIR/match_false_edges.rs:+2:35: +2:36
        _8 = _5;                         // scope 2 at $DIR/match_false_edges.rs:+2:35: +2:36
        _1 = (const 1_i32, move _8);     // scope 2 at $DIR/match_false_edges.rs:+2:31: +2:37
        StorageDead(_8);                 // scope 2 at $DIR/match_false_edges.rs:+2:36: +2:37
        StorageDead(_5);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
        StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
    }

    bb8: {
        StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
        StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
        goto -> bb3;                     // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
    }

    bb9: {
        StorageLive(_9);                 // scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
        _9 = ((_2 as Some).0: i32);      // scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
        StorageLive(_10);                // scope 3 at $DIR/match_false_edges.rs:+3:24: +3:25
        _10 = _9;                        // scope 3 at $DIR/match_false_edges.rs:+3:24: +3:25
        _1 = (const 2_i32, move _10);    // scope 3 at $DIR/match_false_edges.rs:+3:20: +3:26
        StorageDead(_10);                // scope 3 at $DIR/match_false_edges.rs:+3:25: +3:26
        StorageDead(_9);                 // scope 0 at $DIR/match_false_edges.rs:+3:25: +3:26
        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+3:25: +3:26
    }

    bb10: {
        StorageDead(_2);                 // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
        StorageDead(_1);                 // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
        _0 = const ();                   // scope 0 at $DIR/match_false_edges.rs:+0:28: +6:2
        return;                          // scope 0 at $DIR/match_false_edges.rs:+6:2: +6:2
    }

    bb11 (cleanup): {
        resume;                          // scope 0 at $DIR/match_false_edges.rs:+0:1: +6:2
    }
}