Skip to content

Commit 73447f4

Browse files
committed
Bless the tests after merging from master
1 parent 1cd4e9d commit 73447f4

19 files changed

+252
-294
lines changed

tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.32bit.panic-abort.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
StorageDead(_15);
113113
StorageDead(_14);
114114
StorageDead(_16);
115-
_3 = ShallowInitBox(move _13, ());
115+
_3 = ShallowInitBox(copy _13, ());
116116
StorageDead(_13);
117117
StorageDead(_12);
118118
StorageDead(_11);

tests/mir-opt/dont_reset_cast_kind_without_updating_operand.test.GVN.64bit.panic-abort.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
StorageDead(_15);
113113
StorageDead(_14);
114114
StorageDead(_16);
115-
_3 = ShallowInitBox(move _13, ());
115+
_3 = ShallowInitBox(copy _13, ());
116116
StorageDead(_13);
117117
StorageDead(_12);
118118
StorageDead(_11);

tests/mir-opt/gvn.dereference_indexing.GVN.panic-abort.diff

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121

2222
bb0: {
2323
StorageLive(_3);
24-
- StorageLive(_4);
25-
+ nop;
24+
StorageLive(_4);
2625
StorageLive(_5);
2726
_5 = copy _2;
2827
- _4 = Add(move _5, const 1_usize);
@@ -38,9 +37,8 @@
3837

3938
bb1: {
4039
- _3 = &_1[_6];
41-
- StorageDead(_4);
4240
+ _3 = &_1[_4];
43-
+ nop;
41+
StorageDead(_4);
4442
StorageLive(_8);
4543
StorageLive(_9);
4644
_9 = copy (*_3);

tests/mir-opt/gvn.dereference_indexing.GVN.panic-unwind.diff

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121

2222
bb0: {
2323
StorageLive(_3);
24-
- StorageLive(_4);
25-
+ nop;
24+
StorageLive(_4);
2625
StorageLive(_5);
2726
_5 = copy _2;
2827
- _4 = Add(move _5, const 1_usize);
@@ -38,9 +37,8 @@
3837

3938
bb1: {
4039
- _3 = &_1[_6];
41-
- StorageDead(_4);
4240
+ _3 = &_1[_4];
43-
+ nop;
41+
StorageDead(_4);
4442
StorageLive(_8);
4543
StorageLive(_9);
4644
_9 = copy (*_3);

tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
let mut _3: fn(u8) -> u8;
99
let _5: ();
1010
let mut _6: fn(u8) -> u8;
11-
let mut _9: {closure@$DIR/gvn.rs:620:19: 620:21};
11+
let mut _9: {closure@$DIR/gvn.rs:617:19: 617:21};
1212
let _10: ();
1313
let mut _11: fn();
14-
let mut _13: {closure@$DIR/gvn.rs:620:19: 620:21};
14+
let mut _13: {closure@$DIR/gvn.rs:617:19: 617:21};
1515
let _14: ();
1616
let mut _15: fn();
1717
scope 1 {
1818
debug f => _1;
1919
let _4: fn(u8) -> u8;
2020
scope 2 {
2121
debug g => _4;
22-
let _7: {closure@$DIR/gvn.rs:620:19: 620:21};
22+
let _7: {closure@$DIR/gvn.rs:617:19: 617:21};
2323
scope 3 {
2424
debug closure => _7;
2525
let _8: fn();
@@ -60,14 +60,14 @@
6060
StorageDead(_6);
6161
StorageDead(_5);
6262
StorageLive(_7);
63-
- _7 = {closure@$DIR/gvn.rs:620:19: 620:21};
64-
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
63+
- _7 = {closure@$DIR/gvn.rs:617:19: 617:21};
64+
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:617:19: 617:21};
6565
StorageLive(_8);
6666
StorageLive(_9);
6767
- _9 = copy _7;
6868
- _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
69-
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
70-
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
69+
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:617:19: 617:21};
70+
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:617:19: 617:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
7171
StorageDead(_9);
7272
StorageLive(_10);
7373
StorageLive(_11);
@@ -83,8 +83,8 @@
8383
StorageLive(_13);
8484
- _13 = copy _7;
8585
- _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
86-
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
87-
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
86+
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:617:19: 617:21};
87+
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:617:19: 617:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
8888
StorageDead(_13);
8989
StorageLive(_14);
9090
StorageLive(_15);

tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
let mut _3: fn(u8) -> u8;
99
let _5: ();
1010
let mut _6: fn(u8) -> u8;
11-
let mut _9: {closure@$DIR/gvn.rs:620:19: 620:21};
11+
let mut _9: {closure@$DIR/gvn.rs:617:19: 617:21};
1212
let _10: ();
1313
let mut _11: fn();
14-
let mut _13: {closure@$DIR/gvn.rs:620:19: 620:21};
14+
let mut _13: {closure@$DIR/gvn.rs:617:19: 617:21};
1515
let _14: ();
1616
let mut _15: fn();
1717
scope 1 {
1818
debug f => _1;
1919
let _4: fn(u8) -> u8;
2020
scope 2 {
2121
debug g => _4;
22-
let _7: {closure@$DIR/gvn.rs:620:19: 620:21};
22+
let _7: {closure@$DIR/gvn.rs:617:19: 617:21};
2323
scope 3 {
2424
debug closure => _7;
2525
let _8: fn();
@@ -60,14 +60,14 @@
6060
StorageDead(_6);
6161
StorageDead(_5);
6262
StorageLive(_7);
63-
- _7 = {closure@$DIR/gvn.rs:620:19: 620:21};
64-
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
63+
- _7 = {closure@$DIR/gvn.rs:617:19: 617:21};
64+
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:617:19: 617:21};
6565
StorageLive(_8);
6666
StorageLive(_9);
6767
- _9 = copy _7;
6868
- _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
69-
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
70-
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
69+
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:617:19: 617:21};
70+
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:617:19: 617:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
7171
StorageDead(_9);
7272
StorageLive(_10);
7373
StorageLive(_11);
@@ -83,8 +83,8 @@
8383
StorageLive(_13);
8484
- _13 = copy _7;
8585
- _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
86-
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
87-
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
86+
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:617:19: 617:21};
87+
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:617:19: 617:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
8888
StorageDead(_13);
8989
StorageLive(_14);
9090
StorageLive(_15);

tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,16 @@
77
let _2: &[T];
88
let _3: &[T; 3];
99
let _4: [T; 3];
10-
let mut _5: usize;
11-
let mut _6: bool;
12-
let mut _10: !;
10+
let mut _8: !;
1311
scope 1 {
1412
debug v => _2;
13+
let _5: &T;
14+
let _6: &T;
1515
let _7: &T;
16-
let _8: &T;
17-
let _9: &T;
1816
scope 2 {
19-
debug v1 => _7;
20-
debug v2 => _8;
21-
debug v3 => _9;
17+
debug v1 => _5;
18+
debug v2 => _6;
19+
debug v3 => _7;
2220
}
2321
}
2422

@@ -29,27 +27,25 @@
2927
_3 = &_4;
3028
_2 = copy _3 as &[T] (PointerCoercion(Unsize, Implicit));
3129
StorageDead(_3);
32-
nop;
33-
nop;
3430
goto -> bb2;
3531
}
3632

3733
bb1: {
38-
_10 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind unreachable;
34+
_8 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind unreachable;
3935
}
4036

4137
bb2: {
42-
StorageLive(_7);
43-
_7 = &(*_2)[0 of 3];
44-
StorageLive(_8);
45-
_8 = &(*_2)[1 of 3];
46-
StorageLive(_9);
47-
_9 = &(*_2)[2 of 3];
48-
StorageDead(_9);
49-
StorageDead(_8);
50-
StorageDead(_7);
38+
// DBG: _5 = &(*_2)[0 of 3];
39+
// DBG: _6 = &(*_2)[1 of 3];
40+
// DBG: _7 = &(*_2)[2 of 3];
5141
StorageDead(_4);
5242
return;
5343
}
5444
}
5545

46+
ALLOC0 (size: 40, align: 1) {
47+
0x00 │ 69 6e 74 65 72 6e 61 6c 20 65 72 72 6f 72 3a 20 │ internal error:
48+
0x10 │ 65 6e 74 65 72 65 64 20 75 6e 72 65 61 63 68 61 │ entered unreacha
49+
0x20 │ 62 6c 65 20 63 6f 64 65 │ ble code
50+
}
51+

tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-unwind.diff

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,16 @@
77
let _2: &[T];
88
let _3: &[T; 3];
99
let _4: [T; 3];
10-
let mut _5: usize;
11-
let mut _6: bool;
12-
let mut _10: !;
10+
let mut _8: !;
1311
scope 1 {
1412
debug v => _2;
13+
let _5: &T;
14+
let _6: &T;
1515
let _7: &T;
16-
let _8: &T;
17-
let _9: &T;
1816
scope 2 {
19-
debug v1 => _7;
20-
debug v2 => _8;
21-
debug v3 => _9;
17+
debug v1 => _5;
18+
debug v2 => _6;
19+
debug v3 => _7;
2220
}
2321
}
2422

@@ -29,27 +27,25 @@
2927
_3 = &_4;
3028
_2 = copy _3 as &[T] (PointerCoercion(Unsize, Implicit));
3129
StorageDead(_3);
32-
nop;
33-
nop;
3430
goto -> bb2;
3531
}
3632

3733
bb1: {
38-
_10 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind continue;
34+
_8 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind continue;
3935
}
4036

4137
bb2: {
42-
StorageLive(_7);
43-
_7 = &(*_2)[0 of 3];
44-
StorageLive(_8);
45-
_8 = &(*_2)[1 of 3];
46-
StorageLive(_9);
47-
_9 = &(*_2)[2 of 3];
48-
StorageDead(_9);
49-
StorageDead(_8);
50-
StorageDead(_7);
38+
// DBG: _5 = &(*_2)[0 of 3];
39+
// DBG: _6 = &(*_2)[1 of 3];
40+
// DBG: _7 = &(*_2)[2 of 3];
5141
StorageDead(_4);
5242
return;
5343
}
5444
}
5545

46+
ALLOC0 (size: 40, align: 1) {
47+
0x00 │ 69 6e 74 65 72 6e 61 6c 20 65 72 72 6f 72 3a 20 │ internal error:
48+
0x10 │ 65 6e 74 65 72 65 64 20 75 6e 72 65 61 63 68 61 │ entered unreacha
49+
0x20 │ 62 6c 65 20 63 6f 64 65 │ ble code
50+
}
51+

tests/mir-opt/pre-codegen/derived_ord.demo_le.PreCodegen.after.mir

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ fn demo_le(_1: &MultiField, _2: &MultiField) -> bool {
55
debug b => _2;
66
let mut _0: bool;
77
scope 1 (inlined <MultiField as PartialOrd>::le) {
8-
let mut _11: std::option::Option<std::cmp::Ordering>;
8+
let mut _6: std::option::Option<std::cmp::Ordering>;
99
scope 2 (inlined Option::<std::cmp::Ordering>::is_some_and::<fn(std::cmp::Ordering) -> bool {std::cmp::Ordering::is_le}>) {
10+
let mut _11: isize;
1011
let _12: std::cmp::Ordering;
1112
scope 3 {
1213
scope 4 (inlined <fn(std::cmp::Ordering) -> bool {std::cmp::Ordering::is_le} as FnOnce<(std::cmp::Ordering,)>>::call_once - shim(fn(std::cmp::Ordering) -> bool {std::cmp::Ordering::is_le})) {
@@ -19,7 +20,6 @@ fn demo_le(_1: &MultiField, _2: &MultiField) -> bool {
1920
}
2021
}
2122
scope 7 (inlined <MultiField as PartialOrd>::partial_cmp) {
22-
let mut _6: std::option::Option<std::cmp::Ordering>;
2323
let mut _7: i8;
2424
scope 8 {
2525
}
@@ -37,10 +37,9 @@ fn demo_le(_1: &MultiField, _2: &MultiField) -> bool {
3737
}
3838

3939
bb0: {
40-
StorageLive(_11);
40+
StorageLive(_6);
4141
StorageLive(_5);
4242
StorageLive(_7);
43-
StorageLive(_6);
4443
StorageLive(_3);
4544
_3 = copy ((*_1).0: char);
4645
StorageLive(_4);
@@ -62,31 +61,45 @@ fn demo_le(_1: &MultiField, _2: &MultiField) -> bool {
6261
_10 = Cmp(move _8, move _9);
6362
StorageDead(_9);
6463
StorageDead(_8);
65-
_11 = Option::<std::cmp::Ordering>::Some(move _10);
64+
_6 = Option::<std::cmp::Ordering>::Some(move _10);
6665
StorageDead(_10);
67-
StorageDead(_6);
6866
StorageDead(_7);
6967
StorageDead(_5);
70-
goto -> bb3;
68+
StorageLive(_11);
69+
goto -> bb4;
7170
}
7271

7372
bb2: {
74-
_11 = copy _6;
75-
StorageDead(_6);
7673
StorageDead(_7);
7774
StorageDead(_5);
78-
goto -> bb3;
75+
StorageLive(_11);
76+
_11 = discriminant(_6);
77+
switchInt(move _11) -> [0: bb3, 1: bb4, otherwise: bb6];
7978
}
8079

8180
bb3: {
81+
_0 = const false;
82+
goto -> bb5;
83+
}
84+
85+
bb4: {
8286
StorageLive(_12);
83-
_12 = move ((_11 as Some).0: std::cmp::Ordering);
87+
_12 = move ((_6 as Some).0: std::cmp::Ordering);
8488
StorageLive(_13);
8589
_13 = discriminant(_12);
8690
_0 = Le(move _13, const 0_i8);
8791
StorageDead(_13);
8892
StorageDead(_12);
93+
goto -> bb5;
94+
}
95+
96+
bb5: {
8997
StorageDead(_11);
98+
StorageDead(_6);
9099
return;
91100
}
101+
102+
bb6: {
103+
unreachable;
104+
}
92105
}

tests/mir-opt/pre-codegen/derived_ord.{impl#0}-partial_cmp.PreCodegen.after.mir

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ fn <impl at $DIR/derived_ord.rs:5:10: 5:20>::partial_cmp(_1: &MultiField, _2: &M
2020
}
2121

2222
bb0: {
23-
StorageLive(_6);
2423
StorageLive(_3);
2524
_3 = copy ((*_1).0: char);
2625
StorageLive(_4);
@@ -52,7 +51,6 @@ fn <impl at $DIR/derived_ord.rs:5:10: 5:20>::partial_cmp(_1: &MultiField, _2: &M
5251
}
5352

5453
bb3: {
55-
StorageDead(_6);
5654
return;
5755
}
5856
}

0 commit comments

Comments
 (0)