Skip to content

Commit ee4cd86

Browse files
committed
Include tuple projections in MIR tests
1 parent 57c0801 commit ee4cd86

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

src/test/mir-opt/lower_128bit_debug_test.rs

+34
Original file line numberDiff line numberDiff line change
@@ -74,31 +74,65 @@ fn main() {
7474
// START rustc.test_signed.Lower128Bit.after.mir
7575
// _2 = const i128_addo(_1, const 1i128) -> bb10;
7676
// ...
77+
// _1 = (_2.0: i128);
7778
// _3 = const i128_subo(_1, const 2i128) -> bb11;
7879
// ...
80+
// _1 = (_3.0: i128);
7981
// _4 = const i128_mulo(_1, const 3i128) -> bb12;
8082
// ...
83+
// _1 = (_4.0: i128);
84+
// ...
8185
// _1 = const i128_div(_1, const 4i128) -> bb13;
8286
// ...
8387
// _1 = const i128_rem(_1, const 5i128) -> bb15;
8488
// ...
89+
// _1 = (_13.0: i128);
8590
// _14 = const i128_shro(_1, const 7i32) -> bb16;
8691
// ...
92+
// _1 = (_14.0: i128);
93+
// ...
94+
// assert(!(_2.1: bool), "attempt to add with overflow") -> bb1;
95+
// ...
96+
// assert(!(_3.1: bool), "attempt to subtract with overflow") -> bb2;
97+
// ...
98+
// assert(!(_4.1: bool), "attempt to multiply with overflow") -> bb3;
99+
// ...
100+
// assert(!(_13.1: bool), "attempt to shift left with overflow") -> bb8;
101+
// ...
87102
// _13 = const i128_shlo(_1, const 6i32) -> bb14;
103+
// ...
104+
// assert(!(_14.1: bool), "attempt to shift right with overflow") -> bb9;
88105
// END rustc.test_signed.Lower128Bit.after.mir
89106

90107
// START rustc.test_unsigned.Lower128Bit.after.mir
91108
// _2 = const u128_addo(_1, const 1u128) -> bb8;
92109
// ...
110+
// _1 = (_2.0: u128);
93111
// _3 = const u128_subo(_1, const 2u128) -> bb9;
94112
// ...
113+
// _1 = (_3.0: u128);
95114
// _4 = const u128_mulo(_1, const 3u128) -> bb10;
96115
// ...
116+
// _1 = (_4.0: u128);
117+
// ...
97118
// _1 = const u128_div(_1, const 4u128) -> bb11;
98119
// ...
99120
// _1 = const u128_rem(_1, const 5u128) -> bb13;
100121
// ...
122+
// _1 = (_7.0: u128);
101123
// _8 = const u128_shro(_1, const 7i32) -> bb14;
102124
// ...
125+
// _1 = (_8.0: u128);
126+
// ...
127+
// assert(!(_2.1: bool), "attempt to add with overflow") -> bb1;
128+
// ...
129+
// assert(!(_3.1: bool), "attempt to subtract with overflow") -> bb2;
130+
// ...
131+
// assert(!(_4.1: bool), "attempt to multiply with overflow") -> bb3;
132+
// ...
133+
// assert(!(_7.1: bool), "attempt to shift left with overflow") -> bb6;
134+
// ...
103135
// _7 = const i128_shlo(_1, const 6i32) -> bb12;
136+
// ...
137+
// assert(!(_8.1: bool), "attempt to shift right with overflow") -> bb7;
104138
// END rustc.test_unsigned.Lower128Bit.after.mir

0 commit comments

Comments
 (0)