summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir
blob: 7407e7a8b2a178bf0ea773d24da02d0808b83ce4 (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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
// MIR for `test_complex` after built

fn test_complex() -> () {
    let mut _0: ();
    let _1: ();
    let mut _2: E;
    let mut _3: isize;
    let mut _4: bool;
    let mut _5: bool;
    let mut _6: u8;
    let mut _7: Droppy;
    let mut _8: bool;
    let mut _9: u8;
    let mut _10: Droppy;
    let mut _11: bool;
    let mut _12: E;
    let mut _13: isize;

    bb0: {
        StorageLive(_1);
        StorageLive(_2);
        _2 = E::f() -> [return: bb1, unwind: bb31];
    }

    bb1: {
        PlaceMention(_2);
        _3 = discriminant(_2);
        switchInt(move _3) -> [0: bb2, otherwise: bb3];
    }

    bb2: {
        falseEdge -> [real: bb4, imaginary: bb3];
    }

    bb3: {
        goto -> bb19;
    }

    bb4: {
        StorageLive(_4);
        _4 = always_true() -> [return: bb5, unwind: bb31];
    }

    bb5: {
        switchInt(move _4) -> [0: bb7, otherwise: bb6];
    }

    bb6: {
        StorageLive(_5);
        StorageLive(_6);
        StorageLive(_7);
        _7 = Droppy(const 0_u8);
        _6 = (_7.0: u8);
        _5 = Gt(move _6, const 0_u8);
        switchInt(move _5) -> [0: bb9, otherwise: bb8];
    }

    bb7: {
        goto -> bb13;
    }

    bb8: {
        drop(_7) -> [return: bb10, unwind: bb31];
    }

    bb9: {
        goto -> bb11;
    }

    bb10: {
        StorageDead(_7);
        StorageDead(_6);
        goto -> bb16;
    }

    bb11: {
        drop(_7) -> [return: bb12, unwind: bb31];
    }

    bb12: {
        StorageDead(_7);
        StorageDead(_6);
        goto -> bb13;
    }

    bb13: {
        StorageLive(_8);
        StorageLive(_9);
        StorageLive(_10);
        _10 = Droppy(const 1_u8);
        _9 = (_10.0: u8);
        _8 = Gt(move _9, const 1_u8);
        switchInt(move _8) -> [0: bb15, otherwise: bb14];
    }

    bb14: {
        drop(_10) -> [return: bb16, unwind: bb31];
    }

    bb15: {
        goto -> bb17;
    }

    bb16: {
        StorageDead(_10);
        StorageDead(_9);
        _1 = const ();
        goto -> bb20;
    }

    bb17: {
        drop(_10) -> [return: bb18, unwind: bb31];
    }

    bb18: {
        StorageDead(_10);
        StorageDead(_9);
        goto -> bb19;
    }

    bb19: {
        _1 = const ();
        goto -> bb20;
    }

    bb20: {
        StorageDead(_8);
        StorageDead(_5);
        StorageDead(_4);
        StorageDead(_2);
        StorageDead(_1);
        StorageLive(_11);
        _11 = always_true() -> [return: bb21, unwind: bb31];
    }

    bb21: {
        switchInt(move _11) -> [0: bb23, otherwise: bb22];
    }

    bb22: {
        goto -> bb29;
    }

    bb23: {
        goto -> bb24;
    }

    bb24: {
        StorageLive(_12);
        _12 = E::f() -> [return: bb25, unwind: bb31];
    }

    bb25: {
        PlaceMention(_12);
        _13 = discriminant(_12);
        switchInt(move _13) -> [1: bb27, otherwise: bb26];
    }

    bb26: {
        goto -> bb29;
    }

    bb27: {
        falseEdge -> [real: bb28, imaginary: bb26];
    }

    bb28: {
        _0 = const ();
        goto -> bb30;
    }

    bb29: {
        _0 = const ();
        goto -> bb30;
    }

    bb30: {
        StorageDead(_11);
        StorageDead(_12);
        return;
    }

    bb31 (cleanup): {
        resume;
    }
}