Skip to content

Commit ba2809e

Browse files
committed
Update tests.
1 parent 90645c1 commit ba2809e

4 files changed

+88
-108
lines changed

tests/mir-opt/funky_arms.float_to_exponential_common.GVN.32bit.panic-abort.diff

+22-27
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,10 @@
2929
debug precision => _8;
3030
let _8: usize;
3131
scope 5 (inlined Formatter::<'_>::precision) {
32-
let mut _22: std::option::Option<u16>;
33-
scope 6 (inlined Option::<u16>::map::<usize, {closure@Formatter<'_>::precision::{closure#0}}>) {
34-
let mut _23: isize;
35-
let _24: u16;
36-
let mut _25: usize;
37-
scope 7 {
38-
scope 8 (inlined Formatter::<'_>::precision::{closure#0}) {
39-
}
40-
}
41-
}
32+
let mut _22: u32;
33+
let mut _23: u32;
34+
let mut _24: usize;
35+
let mut _25: u16;
4236
}
4337
}
4438
}
@@ -53,7 +47,7 @@
5347
StorageLive(_20);
5448
StorageLive(_21);
5549
_21 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
56-
_20 = BitAnd(move _21, const 1_u32);
50+
_20 = BitAnd(move _21, const core::fmt::flags::SIGN_PLUS_FLAG);
5751
StorageDead(_21);
5852
_4 = Ne(move _20, const 0_u32);
5953
StorageDead(_20);
@@ -75,12 +69,12 @@
7569

7670
bb3: {
7771
StorageLive(_6);
78-
StorageLive(_24);
7972
StorageLive(_22);
80-
_22 = copy (((*_1).0: std::fmt::FormattingOptions).4: std::option::Option<u16>);
8173
StorageLive(_23);
82-
_23 = discriminant(_22);
83-
switchInt(move _23) -> [0: bb11, 1: bb12, otherwise: bb10];
74+
_23 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
75+
_22 = BitAnd(move _23, const core::fmt::flags::PRECISION_FLAG);
76+
StorageDead(_23);
77+
switchInt(move _22) -> [0: bb10, otherwise: bb11];
8478
}
8579

8680
bb4: {
@@ -148,30 +142,31 @@
148142
}
149143

150144
bb9: {
151-
StorageDead(_23);
152-
StorageDead(_22);
153-
StorageDead(_24);
154145
_7 = discriminant(_6);
155-
switchInt(move _7) -> [1: bb4, 0: bb6, otherwise: bb10];
146+
switchInt(move _7) -> [1: bb4, 0: bb6, otherwise: bb12];
156147
}
157148

158149
bb10: {
159-
unreachable;
160-
}
161-
162-
bb11: {
150+
StorageDead(_22);
163151
_6 = const Option::<usize>::None;
164152
goto -> bb9;
165153
}
166154

167-
bb12: {
168-
_24 = move ((_22 as Some).0: u16);
155+
bb11: {
156+
StorageDead(_22);
157+
StorageLive(_24);
169158
StorageLive(_25);
170-
_25 = copy _24 as usize (IntToInt);
171-
_6 = Option::<usize>::Some(move _25);
159+
_25 = copy (((*_1).0: std::fmt::FormattingOptions).2: u16);
160+
_24 = move _25 as usize (IntToInt);
172161
StorageDead(_25);
162+
_6 = Option::<usize>::Some(move _24);
163+
StorageDead(_24);
173164
goto -> bb9;
174165
}
166+
167+
bb12: {
168+
unreachable;
169+
}
175170
}
176171

177172
ALLOC0 (size: 8, align: 4) {

tests/mir-opt/funky_arms.float_to_exponential_common.GVN.32bit.panic-unwind.diff

+22-27
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,10 @@
2929
debug precision => _8;
3030
let _8: usize;
3131
scope 5 (inlined Formatter::<'_>::precision) {
32-
let mut _22: std::option::Option<u16>;
33-
scope 6 (inlined Option::<u16>::map::<usize, {closure@Formatter<'_>::precision::{closure#0}}>) {
34-
let mut _23: isize;
35-
let _24: u16;
36-
let mut _25: usize;
37-
scope 7 {
38-
scope 8 (inlined Formatter::<'_>::precision::{closure#0}) {
39-
}
40-
}
41-
}
32+
let mut _22: u32;
33+
let mut _23: u32;
34+
let mut _24: usize;
35+
let mut _25: u16;
4236
}
4337
}
4438
}
@@ -53,7 +47,7 @@
5347
StorageLive(_20);
5448
StorageLive(_21);
5549
_21 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
56-
_20 = BitAnd(move _21, const 1_u32);
50+
_20 = BitAnd(move _21, const core::fmt::flags::SIGN_PLUS_FLAG);
5751
StorageDead(_21);
5852
_4 = Ne(move _20, const 0_u32);
5953
StorageDead(_20);
@@ -75,12 +69,12 @@
7569

7670
bb3: {
7771
StorageLive(_6);
78-
StorageLive(_24);
7972
StorageLive(_22);
80-
_22 = copy (((*_1).0: std::fmt::FormattingOptions).4: std::option::Option<u16>);
8173
StorageLive(_23);
82-
_23 = discriminant(_22);
83-
switchInt(move _23) -> [0: bb11, 1: bb12, otherwise: bb10];
74+
_23 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
75+
_22 = BitAnd(move _23, const core::fmt::flags::PRECISION_FLAG);
76+
StorageDead(_23);
77+
switchInt(move _22) -> [0: bb10, otherwise: bb11];
8478
}
8579

8680
bb4: {
@@ -148,30 +142,31 @@
148142
}
149143

150144
bb9: {
151-
StorageDead(_23);
152-
StorageDead(_22);
153-
StorageDead(_24);
154145
_7 = discriminant(_6);
155-
switchInt(move _7) -> [1: bb4, 0: bb6, otherwise: bb10];
146+
switchInt(move _7) -> [1: bb4, 0: bb6, otherwise: bb12];
156147
}
157148

158149
bb10: {
159-
unreachable;
160-
}
161-
162-
bb11: {
150+
StorageDead(_22);
163151
_6 = const Option::<usize>::None;
164152
goto -> bb9;
165153
}
166154

167-
bb12: {
168-
_24 = move ((_22 as Some).0: u16);
155+
bb11: {
156+
StorageDead(_22);
157+
StorageLive(_24);
169158
StorageLive(_25);
170-
_25 = copy _24 as usize (IntToInt);
171-
_6 = Option::<usize>::Some(move _25);
159+
_25 = copy (((*_1).0: std::fmt::FormattingOptions).2: u16);
160+
_24 = move _25 as usize (IntToInt);
172161
StorageDead(_25);
162+
_6 = Option::<usize>::Some(move _24);
163+
StorageDead(_24);
173164
goto -> bb9;
174165
}
166+
167+
bb12: {
168+
unreachable;
169+
}
175170
}
176171

177172
ALLOC0 (size: 8, align: 4) {

tests/mir-opt/funky_arms.float_to_exponential_common.GVN.64bit.panic-abort.diff

+22-27
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,10 @@
2929
debug precision => _8;
3030
let _8: usize;
3131
scope 5 (inlined Formatter::<'_>::precision) {
32-
let mut _22: std::option::Option<u16>;
33-
scope 6 (inlined Option::<u16>::map::<usize, {closure@Formatter<'_>::precision::{closure#0}}>) {
34-
let mut _23: isize;
35-
let _24: u16;
36-
let mut _25: usize;
37-
scope 7 {
38-
scope 8 (inlined Formatter::<'_>::precision::{closure#0}) {
39-
}
40-
}
41-
}
32+
let mut _22: u32;
33+
let mut _23: u32;
34+
let mut _24: usize;
35+
let mut _25: u16;
4236
}
4337
}
4438
}
@@ -53,7 +47,7 @@
5347
StorageLive(_20);
5448
StorageLive(_21);
5549
_21 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
56-
_20 = BitAnd(move _21, const 1_u32);
50+
_20 = BitAnd(move _21, const core::fmt::flags::SIGN_PLUS_FLAG);
5751
StorageDead(_21);
5852
_4 = Ne(move _20, const 0_u32);
5953
StorageDead(_20);
@@ -75,12 +69,12 @@
7569

7670
bb3: {
7771
StorageLive(_6);
78-
StorageLive(_24);
7972
StorageLive(_22);
80-
_22 = copy (((*_1).0: std::fmt::FormattingOptions).4: std::option::Option<u16>);
8173
StorageLive(_23);
82-
_23 = discriminant(_22);
83-
switchInt(move _23) -> [0: bb11, 1: bb12, otherwise: bb10];
74+
_23 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
75+
_22 = BitAnd(move _23, const core::fmt::flags::PRECISION_FLAG);
76+
StorageDead(_23);
77+
switchInt(move _22) -> [0: bb10, otherwise: bb11];
8478
}
8579

8680
bb4: {
@@ -148,30 +142,31 @@
148142
}
149143

150144
bb9: {
151-
StorageDead(_23);
152-
StorageDead(_22);
153-
StorageDead(_24);
154145
_7 = discriminant(_6);
155-
switchInt(move _7) -> [1: bb4, 0: bb6, otherwise: bb10];
146+
switchInt(move _7) -> [1: bb4, 0: bb6, otherwise: bb12];
156147
}
157148

158149
bb10: {
159-
unreachable;
160-
}
161-
162-
bb11: {
150+
StorageDead(_22);
163151
_6 = const Option::<usize>::None;
164152
goto -> bb9;
165153
}
166154

167-
bb12: {
168-
_24 = move ((_22 as Some).0: u16);
155+
bb11: {
156+
StorageDead(_22);
157+
StorageLive(_24);
169158
StorageLive(_25);
170-
_25 = copy _24 as usize (IntToInt);
171-
_6 = Option::<usize>::Some(move _25);
159+
_25 = copy (((*_1).0: std::fmt::FormattingOptions).2: u16);
160+
_24 = move _25 as usize (IntToInt);
172161
StorageDead(_25);
162+
_6 = Option::<usize>::Some(move _24);
163+
StorageDead(_24);
173164
goto -> bb9;
174165
}
166+
167+
bb12: {
168+
unreachable;
169+
}
175170
}
176171

177172
ALLOC0 (size: 16, align: 8) {

tests/mir-opt/funky_arms.float_to_exponential_common.GVN.64bit.panic-unwind.diff

+22-27
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,10 @@
2929
debug precision => _8;
3030
let _8: usize;
3131
scope 5 (inlined Formatter::<'_>::precision) {
32-
let mut _22: std::option::Option<u16>;
33-
scope 6 (inlined Option::<u16>::map::<usize, {closure@Formatter<'_>::precision::{closure#0}}>) {
34-
let mut _23: isize;
35-
let _24: u16;
36-
let mut _25: usize;
37-
scope 7 {
38-
scope 8 (inlined Formatter::<'_>::precision::{closure#0}) {
39-
}
40-
}
41-
}
32+
let mut _22: u32;
33+
let mut _23: u32;
34+
let mut _24: usize;
35+
let mut _25: u16;
4236
}
4337
}
4438
}
@@ -53,7 +47,7 @@
5347
StorageLive(_20);
5448
StorageLive(_21);
5549
_21 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
56-
_20 = BitAnd(move _21, const 1_u32);
50+
_20 = BitAnd(move _21, const core::fmt::flags::SIGN_PLUS_FLAG);
5751
StorageDead(_21);
5852
_4 = Ne(move _20, const 0_u32);
5953
StorageDead(_20);
@@ -75,12 +69,12 @@
7569

7670
bb3: {
7771
StorageLive(_6);
78-
StorageLive(_24);
7972
StorageLive(_22);
80-
_22 = copy (((*_1).0: std::fmt::FormattingOptions).4: std::option::Option<u16>);
8173
StorageLive(_23);
82-
_23 = discriminant(_22);
83-
switchInt(move _23) -> [0: bb11, 1: bb12, otherwise: bb10];
74+
_23 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
75+
_22 = BitAnd(move _23, const core::fmt::flags::PRECISION_FLAG);
76+
StorageDead(_23);
77+
switchInt(move _22) -> [0: bb10, otherwise: bb11];
8478
}
8579

8680
bb4: {
@@ -148,30 +142,31 @@
148142
}
149143

150144
bb9: {
151-
StorageDead(_23);
152-
StorageDead(_22);
153-
StorageDead(_24);
154145
_7 = discriminant(_6);
155-
switchInt(move _7) -> [1: bb4, 0: bb6, otherwise: bb10];
146+
switchInt(move _7) -> [1: bb4, 0: bb6, otherwise: bb12];
156147
}
157148

158149
bb10: {
159-
unreachable;
160-
}
161-
162-
bb11: {
150+
StorageDead(_22);
163151
_6 = const Option::<usize>::None;
164152
goto -> bb9;
165153
}
166154

167-
bb12: {
168-
_24 = move ((_22 as Some).0: u16);
155+
bb11: {
156+
StorageDead(_22);
157+
StorageLive(_24);
169158
StorageLive(_25);
170-
_25 = copy _24 as usize (IntToInt);
171-
_6 = Option::<usize>::Some(move _25);
159+
_25 = copy (((*_1).0: std::fmt::FormattingOptions).2: u16);
160+
_24 = move _25 as usize (IntToInt);
172161
StorageDead(_25);
162+
_6 = Option::<usize>::Some(move _24);
163+
StorageDead(_24);
173164
goto -> bb9;
174165
}
166+
167+
bb12: {
168+
unreachable;
169+
}
175170
}
176171

177172
ALLOC0 (size: 16, align: 8) {

0 commit comments

Comments
 (0)