summary refs log tree commit diff
path: root/tests/ui/stable-mir-print/operands.stdout
blob: c3b1151ae24a3e9d74c79039c4cb9ed1f2db4643 (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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
// WARNING: This is highly experimental output it's intended for stable-mir developers only.
// If you find a bug or want to improve the output open a issue at https://github.com/rust-lang/project-stable-mir.
fn operands(_1: u8) -> () {
    let mut _0: ();
    let  _2: [u8; 10];
    let  _3: u8;
    let  _4: usize;
    let mut _5: bool;
    let  _6: u8;
    let  _7: usize;
    let mut _8: (usize, bool);
    let mut _9: bool;
    let mut _10: (&u8, &u8);
    let mut _11: &u8;
    let mut _12: &u8;
    let  _13: &u8;
    let  _14: &u8;
    let mut _15: bool;
    let mut _16: u8;
    let mut _17: u8;
    let  _18: core::panicking::AssertKind;
    let  _19: !;
    let mut _20: Option<Arguments<'_>>;
    let  _21: &u8;
    let  _22: u8;
    let mut _23: (&u8, &u8);
    let mut _24: &u8;
    let mut _25: &u8;
    let  _26: &u8;
    let  _27: &u8;
    let mut _28: bool;
    let mut _29: u8;
    let mut _30: u8;
    let  _31: core::panicking::AssertKind;
    let  _32: !;
    let mut _33: Option<Arguments<'_>>;
    let  _34: (u8, u8);
    let  _35: u8;
    let  _36: u8;
    let mut _37: (&u8, &u8);
    let mut _38: &u8;
    let mut _39: &u8;
    let  _40: &u8;
    let  _41: &u8;
    let mut _42: bool;
    let mut _43: u8;
    let mut _44: u8;
    let  _45: core::panicking::AssertKind;
    let  _46: !;
    let mut _47: Option<Arguments<'_>>;
    let  _48: usize;
    let mut _49: &[u8];
    let mut _50: &[u8; 10];
    let  _51: usize;
    let  _52: &usize;
    let mut _53: (&usize, &usize);
    let mut _54: &usize;
    let mut _55: &usize;
    let  _56: &usize;
    let  _57: &usize;
    let mut _58: bool;
    let mut _59: usize;
    let mut _60: usize;
    let  _61: core::panicking::AssertKind;
    let  _62: !;
    let mut _63: Option<Arguments<'_>>;
    debug val => _1;
    debug array => _2;
    debug first => _3;
    debug last => _6;
    debug left_val => _13;
    debug right_val => _14;
    debug kind => _18;
    debug reference => _21;
    debug dereferenced => _22;
    debug left_val => _26;
    debug right_val => _27;
    debug kind => _31;
    debug tuple => _34;
    debug first_again => _35;
    debug first_again_again => _36;
    debug left_val => _40;
    debug right_val => _41;
    debug kind => _45;
    debug length => _48;
    debug size_of => _51;
    debug left_val => _56;
    debug right_val => _57;
    debug kind => _61;
    bb0: {
        _2 = [_1; 10];
        _4 = 0_usize;
        _5 = Lt(_4, 10_usize);
        assert(move _5, "index out of bounds: the length is {} but the index is {}", 10_usize, _4) -> [success: bb1, unwind unreachable];
    }
    bb1: {
        _3 = _2[_4];
        _8 = CheckedSub(10_usize, 1_usize);
        assert(!move (_8.1: bool), "attempt to compute `{} - {}`, which would overflow", 10_usize, 1_usize) -> [success: bb2, unwind unreachable];
    }
    bb2: {
        _7 = move (_8.0: usize);
        _9 = Lt(_7, 10_usize);
        assert(move _9, "index out of bounds: the length is {} but the index is {}", 10_usize, _7) -> [success: bb3, unwind unreachable];
    }
    bb3: {
        _6 = _2[_7];
        _11 = &_3;
        _12 = &_6;
        _10 = (move _11, move _12);
        _13 = (_10.0: &u8);
        _14 = (_10.1: &u8);
        _16 = (*_13);
        _17 = (*_14);
        _15 = Eq(move _16, move _17);
        switchInt(move _15) -> [0: bb5, otherwise: bb4];
    }
    bb4: {
        _21 = &_3;
        _22 = (*_21);
        _24 = &_22;
        _25 = &_3;
        _23 = (move _24, move _25);
        _26 = (_23.0: &u8);
        _27 = (_23.1: &u8);
        _29 = (*_26);
        _30 = (*_27);
        _28 = Eq(move _29, move _30);
        switchInt(move _28) -> [0: bb7, otherwise: bb6];
    }
    bb5: {
        _18 = core::panicking::AssertKind::Eq;
        _20 = std::option::Option::None;
        _19 = core::panicking::assert_failed::<u8, u8>(move _18, _13, _14, move _20) -> unwind unreachable;
    }
    bb6: {
        _34 = (_3, _6);
        _35 = (_34.0: u8);
        _36 = (_34.0: u8);
        _38 = &_35;
        _39 = &_36;
        _37 = (move _38, move _39);
        _40 = (_37.0: &u8);
        _41 = (_37.1: &u8);
        _43 = (*_40);
        _44 = (*_41);
        _42 = Eq(move _43, move _44);
        switchInt(move _42) -> [0: bb9, otherwise: bb8];
    }
    bb7: {
        _31 = core::panicking::AssertKind::Eq;
        _33 = std::option::Option::None;
        _32 = core::panicking::assert_failed::<u8, u8>(move _31, _26, _27, move _33) -> unwind unreachable;
    }
    bb8: {
        _50 = &_2;
        _49 = move _50 as &[u8];
        _48 = PtrMetadata(move _49);
        _52 = &_48;
        _51 = std::mem::size_of_val::<usize>(_52) -> [return: bb10, unwind unreachable];
    }
    bb9: {
        _45 = core::panicking::AssertKind::Eq;
        _47 = std::option::Option::None;
        _46 = core::panicking::assert_failed::<u8, u8>(move _45, _40, _41, move _47) -> unwind unreachable;
    }
    bb10: {
        _54 = &_48;
        _55 = &_51;
        _53 = (move _54, move _55);
        _56 = (_53.0: &usize);
        _57 = (_53.1: &usize);
        _59 = (*_56);
        _60 = (*_57);
        _58 = Eq(move _59, move _60);
        switchInt(move _58) -> [0: bb12, otherwise: bb11];
    }
    bb11: {
        return;
    }
    bb12: {
        _61 = core::panicking::AssertKind::Eq;
        _63 = std::option::Option::None;
        _62 = core::panicking::assert_failed::<usize, usize>(move _61, _56, _57, move _63) -> unwind unreachable;
    }
}
fn operands::{constant#0}() -> usize {
    let mut _0: usize;
    bb0: {
        _0 = 10_usize;
        return;
    }
}
fn more_operands() -> [Ctors; 3] {
    let mut _0: [Ctors; 3];
    let  _1: Dummy;
    let  _2: Ctors;
    let  _3: Ctors;
    let  _4: Ctors;
    debug dummy => _1;
    debug unit => _2;
    debug struct_like => _3;
    debug tup_like => _4;
    bb0: {
        _1 = Dummy('a', core::num::<impl i32>::MIN);
        _2 = Ctors::Unit;
        _3 = Ctors::StructLike(move _1);
        _4 = Ctors::TupLike(false);
        _0 = [move _2, move _3, move _4];
        return;
    }
}
fn more_operands::{constant#0}() -> usize {
    let mut _0: usize;
    bb0: {
        _0 = 3_usize;
        return;
    }
}
fn closures(_1: bool, _2: bool) -> {closure@$DIR/operands.rs:47:5: 47:19} {
    let mut _0: {closure@$DIR/operands.rs:47:5: 47:19};
    debug x => _1;
    debug z => _2;
    bb0: {
        _0 = {closure@$DIR/operands.rs:47:5: 47:19}(_1, _2);
        return;
    }
}
fn closures::{closure#0}(_1: {closure@$DIR/operands.rs:47:5: 47:19}, _2: bool) -> bool {
    let mut _0: bool;
    let mut _3: bool;
    let mut _4: bool;
    debug y => _2;
    debug x => (_1.0: bool);
    debug z => (_1.1: bool);
    bb0: {
        _4 = (_1.0: bool);
        _3 = BitXor(move _4, _2);
        switchInt(move _3) -> [0: bb2, otherwise: bb1];
    }
    bb1: {
        _0 = true;
        goto -> bb3;
    }
    bb2: {
        _0 = (_1.1: bool);
        goto -> bb3;
    }
    bb3: {
        return;
    }
}
fn Ctors::TupLike(_1: bool) -> Ctors {
    let mut _0: Ctors;
    bb0: {
        _0 = Ctors::TupLike(move _1);
        return;
    }
}