Skip to content

Commit 8d6d8f0

Browse files
committed
Fix/bless tests broken by DSE
1 parent bf153a2 commit 8d6d8f0

File tree

42 files changed

+197
-300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+197
-300
lines changed

src/test/codegen-units/item-collection/unsizing.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// compile-flags:-Zprint-mono-items=eager
22
// compile-flags:-Zinline-in-all-cgus
3+
// compile-flags:-Zmir-opt-level=0
34

45
#![deny(dead_code)]
56
#![feature(coerce_unsized)]

src/test/incremental/hashes/for_loops.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ pub fn change_loop_body() {
3131
}
3232

3333
#[cfg(not(any(cfail1,cfail4)))]
34-
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, optimized_mir")]
34+
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes")]
3535
#[rustc_clean(cfg="cfail3")]
36-
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes, optimized_mir")]
36+
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes")]
3737
#[rustc_clean(cfg="cfail6")]
3838
pub fn change_loop_body() {
3939
let mut _x = 0;
@@ -183,7 +183,7 @@ pub fn add_loop_label_to_break() {
183183
#[cfg(not(any(cfail1,cfail4)))]
184184
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes")]
185185
#[rustc_clean(cfg="cfail3")]
186-
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes, optimized_mir")]
186+
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes")]
187187
#[rustc_clean(cfg="cfail6")]
188188
pub fn add_loop_label_to_break() {
189189
let mut _x = 0;

src/test/incremental/hashes/let_expressions.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ pub fn change_initializer() {
213213
}
214214

215215
#[cfg(not(any(cfail1,cfail4)))]
216-
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes,optimized_mir")]
216+
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes")]
217217
#[rustc_clean(cfg="cfail3")]
218-
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes,optimized_mir")]
218+
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes")]
219219
#[rustc_clean(cfg="cfail6")]
220220
pub fn change_initializer() {
221221
let _x = 5u16;

src/test/incremental/hashes/loop_expressions.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ pub fn change_loop_body() {
3131
}
3232

3333
#[cfg(not(any(cfail1,cfail4)))]
34-
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, optimized_mir")]
34+
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes")]
3535
#[rustc_clean(cfg="cfail3")]
36-
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes, optimized_mir")]
36+
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes")]
3737
#[rustc_clean(cfg="cfail6")]
3838
pub fn change_loop_body() {
3939
let mut _x = 0;

src/test/incremental/hashes/while_loops.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ pub fn change_loop_body() {
3131
}
3232

3333
#[cfg(not(any(cfail1,cfail4)))]
34-
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, optimized_mir")]
34+
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes")]
3535
#[rustc_clean(cfg="cfail3")]
36-
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes, optimized_mir")]
36+
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes")]
3737
#[rustc_clean(cfg="cfail6")]
3838
pub fn change_loop_body() {
3939
let mut _x = 0;
@@ -56,9 +56,9 @@ pub fn change_loop_condition() {
5656
}
5757

5858
#[cfg(not(any(cfail1,cfail4)))]
59-
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, optimized_mir")]
59+
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes")]
6060
#[rustc_clean(cfg="cfail3")]
61-
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes, optimized_mir")]
61+
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes")]
6262
#[rustc_clean(cfg="cfail6")]
6363
pub fn change_loop_condition() {
6464
let mut _x = 0;

src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.32bit.mir

-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@ fn main() -> () {
1717

1818
bb0: {
1919
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
20-
_1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
2120
StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
22-
_2 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
2321
StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
24-
_3 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
2522
StorageDead(_3); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
2623
StorageDead(_2); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
2724
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2

src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.64bit.mir

-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@ fn main() -> () {
1717

1818
bb0: {
1919
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
20-
_1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
2120
StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
22-
_2 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
2321
StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
24-
_3 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
2522
StorageDead(_3); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
2623
StorageDead(_2); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
2724
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2

src/test/mir-opt/dest-prop/branch.main.DestinationPropagation.diff

+8-16
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,23 @@
77
let mut _3: bool; // in scope 0 at $DIR/branch.rs:15:16: 15:22
88
let _4: i32; // in scope 0 at $DIR/branch.rs:18:9: 18:14
99
scope 1 {
10-
- debug x => _1; // in scope 1 at $DIR/branch.rs:13:9: 13:10
11-
+ debug x => _2; // in scope 1 at $DIR/branch.rs:13:9: 13:10
10+
debug x => _1; // in scope 1 at $DIR/branch.rs:13:9: 13:10
1211
let _2: i32; // in scope 1 at $DIR/branch.rs:15:9: 15:10
1312
scope 2 {
1413
debug y => _2; // in scope 2 at $DIR/branch.rs:15:9: 15:10
1514
}
1615
}
1716

1817
bb0: {
19-
- StorageLive(_1); // scope 0 at $DIR/branch.rs:13:9: 13:10
20-
- _1 = val() -> bb1; // scope 0 at $DIR/branch.rs:13:13: 13:18
21-
+ nop; // scope 0 at $DIR/branch.rs:13:9: 13:10
22-
+ _2 = val() -> bb1; // scope 0 at $DIR/branch.rs:13:13: 13:18
18+
StorageLive(_1); // scope 0 at $DIR/branch.rs:13:9: 13:10
19+
_1 = val() -> bb1; // scope 0 at $DIR/branch.rs:13:13: 13:18
2320
// mir::Constant
2421
// + span: $DIR/branch.rs:13:13: 13:16
2522
// + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar(<ZST>)) }
2623
}
2724

2825
bb1: {
29-
- StorageLive(_2); // scope 1 at $DIR/branch.rs:15:9: 15:10
30-
+ nop; // scope 1 at $DIR/branch.rs:15:9: 15:10
26+
StorageLive(_2); // scope 1 at $DIR/branch.rs:15:9: 15:10
3127
StorageLive(_3); // scope 1 at $DIR/branch.rs:15:16: 15:22
3228
_3 = cond() -> bb2; // scope 1 at $DIR/branch.rs:15:16: 15:22
3329
// mir::Constant
@@ -40,8 +36,7 @@
4036
}
4137

4238
bb3: {
43-
- _2 = _1; // scope 1 at $DIR/branch.rs:16:9: 16:10
44-
+ nop; // scope 1 at $DIR/branch.rs:16:9: 16:10
39+
nop; // scope 1 at $DIR/branch.rs:16:9: 16:10
4540
goto -> bb6; // scope 1 at $DIR/branch.rs:15:13: 20:6
4641
}
4742

@@ -55,18 +50,15 @@
5550

5651
bb5: {
5752
StorageDead(_4); // scope 1 at $DIR/branch.rs:18:14: 18:15
58-
- _2 = _1; // scope 1 at $DIR/branch.rs:19:9: 19:10
59-
+ nop; // scope 1 at $DIR/branch.rs:19:9: 19:10
53+
nop; // scope 1 at $DIR/branch.rs:19:9: 19:10
6054
goto -> bb6; // scope 1 at $DIR/branch.rs:15:13: 20:6
6155
}
6256

6357
bb6: {
6458
StorageDead(_3); // scope 1 at $DIR/branch.rs:20:5: 20:6
6559
nop; // scope 0 at $DIR/branch.rs:12:11: 21:2
66-
- StorageDead(_2); // scope 1 at $DIR/branch.rs:21:1: 21:2
67-
- StorageDead(_1); // scope 0 at $DIR/branch.rs:21:1: 21:2
68-
+ nop; // scope 1 at $DIR/branch.rs:21:1: 21:2
69-
+ nop; // scope 0 at $DIR/branch.rs:21:1: 21:2
60+
StorageDead(_2); // scope 1 at $DIR/branch.rs:21:1: 21:2
61+
StorageDead(_1); // scope 0 at $DIR/branch.rs:21:1: 21:2
7062
return; // scope 0 at $DIR/branch.rs:21:2: 21:2
7163
}
7264
}

src/test/mir-opt/dest-prop/copy_propagation_arg.arg_src.DestinationPropagation.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- _2 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:28:13: 28:14
1616
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:28:9: 28:10
1717
+ _0 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:28:13: 28:14
18-
_1 = const 123_i32; // scope 1 at $DIR/copy_propagation_arg.rs:29:5: 29:12
18+
nop; // scope 1 at $DIR/copy_propagation_arg.rs:29:5: 29:12
1919
- _0 = _2; // scope 1 at $DIR/copy_propagation_arg.rs:30:5: 30:6
2020
- StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:31:1: 31:2
2121
+ nop; // scope 1 at $DIR/copy_propagation_arg.rs:30:5: 30:6

src/test/mir-opt/dest-prop/copy_propagation_arg.bar.DestinationPropagation.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
bb1: {
2121
StorageDead(_3); // scope 0 at $DIR/copy_propagation_arg.rs:16:12: 16:13
2222
StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:16:13: 16:14
23-
_1 = const 5_u8; // scope 0 at $DIR/copy_propagation_arg.rs:17:5: 17:10
23+
nop; // scope 0 at $DIR/copy_propagation_arg.rs:17:5: 17:10
2424
nop; // scope 0 at $DIR/copy_propagation_arg.rs:15:19: 18:2
2525
return; // scope 0 at $DIR/copy_propagation_arg.rs:18:2: 18:2
2626
}

src/test/mir-opt/dest-prop/copy_propagation_arg.baz.DestinationPropagation.diff

+4-8
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@
77
let mut _2: i32; // in scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
88

99
bb0: {
10-
- StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
11-
- _2 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
12-
- _1 = move _2; // scope 0 at $DIR/copy_propagation_arg.rs:23:5: 23:10
13-
- StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
14-
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
15-
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
16-
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:5: 23:10
17-
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
10+
StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
11+
nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
12+
nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:5: 23:10
13+
StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
1814
nop; // scope 0 at $DIR/copy_propagation_arg.rs:21:20: 24:2
1915
return; // scope 0 at $DIR/copy_propagation_arg.rs:24:2: 24:2
2016
}

src/test/mir-opt/dest-prop/copy_propagation_arg.foo.DestinationPropagation.diff

+4-8
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,19 @@
88
let mut _3: u8; // in scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16
99

1010
bb0: {
11-
- StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
12-
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
11+
StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
1312
StorageLive(_3); // scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16
1413
_3 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16
15-
- _2 = dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
16-
+ _1 = dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
14+
_2 = dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
1715
// mir::Constant
1816
// + span: $DIR/copy_propagation_arg.rs:11:9: 11:14
1917
// + literal: Const { ty: fn(u8) -> u8 {dummy}, val: Value(Scalar(<ZST>)) }
2018
}
2119

2220
bb1: {
2321
StorageDead(_3); // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
24-
- _1 = move _2; // scope 0 at $DIR/copy_propagation_arg.rs:11:5: 11:17
25-
- StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
26-
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:11:5: 11:17
27-
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
22+
nop; // scope 0 at $DIR/copy_propagation_arg.rs:11:5: 11:17
23+
StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
2824
nop; // scope 0 at $DIR/copy_propagation_arg.rs:9:19: 12:2
2925
return; // scope 0 at $DIR/copy_propagation_arg.rs:12:2: 12:2
3026
}

src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff

+17-34
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@
88
let _5: (); // in scope 0 at $DIR/cycle.rs:14:5: 14:12
99
let mut _6: i32; // in scope 0 at $DIR/cycle.rs:14:10: 14:11
1010
scope 1 {
11-
- debug x => _1; // in scope 1 at $DIR/cycle.rs:9:9: 9:14
12-
+ debug x => _4; // in scope 1 at $DIR/cycle.rs:9:9: 9:14
11+
debug x => _1; // in scope 1 at $DIR/cycle.rs:9:9: 9:14
1312
let _2: i32; // in scope 1 at $DIR/cycle.rs:10:9: 10:10
1413
scope 2 {
15-
- debug y => _2; // in scope 2 at $DIR/cycle.rs:10:9: 10:10
16-
+ debug y => _4; // in scope 2 at $DIR/cycle.rs:10:9: 10:10
14+
debug y => _2; // in scope 2 at $DIR/cycle.rs:10:9: 10:10
1715
let _3: i32; // in scope 2 at $DIR/cycle.rs:11:9: 11:10
1816
scope 3 {
19-
- debug z => _3; // in scope 3 at $DIR/cycle.rs:11:9: 11:10
20-
+ debug z => _4; // in scope 3 at $DIR/cycle.rs:11:9: 11:10
17+
debug z => _3; // in scope 3 at $DIR/cycle.rs:11:9: 11:10
2118
scope 4 (inlined std::mem::drop::<i32>) { // at $DIR/cycle.rs:14:5: 14:12
2219
debug _x => _6; // in scope 4 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
2320
}
@@ -26,44 +23,30 @@
2623
}
2724

2825
bb0: {
29-
- StorageLive(_1); // scope 0 at $DIR/cycle.rs:9:9: 9:14
30-
- _1 = val() -> bb1; // scope 0 at $DIR/cycle.rs:9:17: 9:22
31-
+ nop; // scope 0 at $DIR/cycle.rs:9:9: 9:14
32-
+ _4 = val() -> bb1; // scope 0 at $DIR/cycle.rs:9:17: 9:22
26+
StorageLive(_1); // scope 0 at $DIR/cycle.rs:9:9: 9:14
27+
_1 = val() -> bb1; // scope 0 at $DIR/cycle.rs:9:17: 9:22
3328
// mir::Constant
3429
// + span: $DIR/cycle.rs:9:17: 9:20
3530
// + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar(<ZST>)) }
3631
}
3732

3833
bb1: {
39-
- StorageLive(_2); // scope 1 at $DIR/cycle.rs:10:9: 10:10
40-
- _2 = _1; // scope 1 at $DIR/cycle.rs:10:13: 10:14
41-
- StorageLive(_3); // scope 2 at $DIR/cycle.rs:11:9: 11:10
42-
- _3 = _2; // scope 2 at $DIR/cycle.rs:11:13: 11:14
43-
- StorageLive(_4); // scope 3 at $DIR/cycle.rs:12:9: 12:10
44-
- _4 = _3; // scope 3 at $DIR/cycle.rs:12:9: 12:10
45-
- _1 = move _4; // scope 3 at $DIR/cycle.rs:12:5: 12:10
46-
- StorageDead(_4); // scope 3 at $DIR/cycle.rs:12:9: 12:10
47-
+ nop; // scope 1 at $DIR/cycle.rs:10:9: 10:10
48-
+ nop; // scope 1 at $DIR/cycle.rs:10:13: 10:14
49-
+ nop; // scope 2 at $DIR/cycle.rs:11:9: 11:10
50-
+ nop; // scope 2 at $DIR/cycle.rs:11:13: 11:14
51-
+ nop; // scope 3 at $DIR/cycle.rs:12:9: 12:10
52-
+ nop; // scope 3 at $DIR/cycle.rs:12:9: 12:10
53-
+ nop; // scope 3 at $DIR/cycle.rs:12:5: 12:10
54-
+ nop; // scope 3 at $DIR/cycle.rs:12:9: 12:10
34+
StorageLive(_2); // scope 1 at $DIR/cycle.rs:10:9: 10:10
35+
nop; // scope 1 at $DIR/cycle.rs:10:13: 10:14
36+
StorageLive(_3); // scope 2 at $DIR/cycle.rs:11:9: 11:10
37+
nop; // scope 2 at $DIR/cycle.rs:11:13: 11:14
38+
StorageLive(_4); // scope 3 at $DIR/cycle.rs:12:9: 12:10
39+
nop; // scope 3 at $DIR/cycle.rs:12:9: 12:10
40+
nop; // scope 3 at $DIR/cycle.rs:12:5: 12:10
41+
StorageDead(_4); // scope 3 at $DIR/cycle.rs:12:9: 12:10
5542
StorageLive(_5); // scope 3 at $DIR/cycle.rs:14:5: 14:12
5643
StorageLive(_6); // scope 3 at $DIR/cycle.rs:14:10: 14:11
57-
- _6 = _1; // scope 3 at $DIR/cycle.rs:14:10: 14:11
58-
+ _6 = _4; // scope 3 at $DIR/cycle.rs:14:10: 14:11
44+
nop; // scope 3 at $DIR/cycle.rs:14:10: 14:11
5945
StorageDead(_6); // scope 3 at $DIR/cycle.rs:14:11: 14:12
6046
StorageDead(_5); // scope 3 at $DIR/cycle.rs:14:12: 14:13
61-
- StorageDead(_3); // scope 2 at $DIR/cycle.rs:15:1: 15:2
62-
- StorageDead(_2); // scope 1 at $DIR/cycle.rs:15:1: 15:2
63-
- StorageDead(_1); // scope 0 at $DIR/cycle.rs:15:1: 15:2
64-
+ nop; // scope 2 at $DIR/cycle.rs:15:1: 15:2
65-
+ nop; // scope 1 at $DIR/cycle.rs:15:1: 15:2
66-
+ nop; // scope 0 at $DIR/cycle.rs:15:1: 15:2
47+
StorageDead(_3); // scope 2 at $DIR/cycle.rs:15:1: 15:2
48+
StorageDead(_2); // scope 1 at $DIR/cycle.rs:15:1: 15:2
49+
StorageDead(_1); // scope 0 at $DIR/cycle.rs:15:1: 15:2
6750
return; // scope 0 at $DIR/cycle.rs:15:2: 15:2
6851
}
6952
}

0 commit comments

Comments
 (0)