Skip to content

Commit 8f77e36

Browse files
Bless mir-opt tests
1 parent 4239d74 commit 8f77e36

File tree

11 files changed

+87
-96
lines changed

11 files changed

+87
-96
lines changed

src/test/mir-opt/const_allocation/32bit/rustc.main.ConstProp.after.mir

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,42 +30,42 @@ fn main() -> () {
3030
}
3131

3232
alloc0 (static: FOO, size: 8, align: 4) {
33-
╾─alloc17─╼ 03 00 00 00 │ ╾──╼....
33+
╾─alloc14─╼ 03 00 00 00 │ ╾──╼....
3434
}
3535

36-
alloc17 (size: 48, align: 4) {
36+
alloc14 (size: 48, align: 4) {
3737
0x00 │ 00 00 00 00 __ __ __ __ ╾─alloc4──╼ 00 00 00 00 │ ....░░░░╾──╼....
38-
0x10 │ 00 00 00 00 __ __ __ __ ╾─alloc8──╼ 02 00 00 00 │ ....░░░░╾──╼....
39-
0x20 │ 01 00 00 00 2a 00 00 00 ╾─alloc13─╼ 03 00 00 00 │ ....*...╾──╼....
38+
0x10 │ 00 00 00 00 __ __ __ __ ╾─alloc7──╼ 02 00 00 00 │ ....░░░░╾──╼....
39+
0x20 │ 01 00 00 00 2a 00 00 00 ╾─alloc11─╼ 03 00 00 00 │ ....*...╾──╼....
4040
}
4141

4242
alloc4 (size: 0, align: 4) {}
4343

44-
alloc8 (size: 16, align: 4) {
45-
╾─alloc7──╼ 03 00 00 00 ╾─alloc9──╼ 03 00 00 00 │ ╾──╼....╾──╼....
44+
alloc7 (size: 16, align: 4) {
45+
╾─alloc6──╼ 03 00 00 00 ╾─alloc8──╼ 03 00 00 00 │ ╾──╼....╾──╼....
4646
}
4747

48-
alloc7 (size: 3, align: 1) {
48+
alloc6 (size: 3, align: 1) {
4949
66 6f 6f │ foo
5050
}
5151

52-
alloc9 (size: 3, align: 1) {
52+
alloc8 (size: 3, align: 1) {
5353
62 61 72 │ bar
5454
}
5555

56-
alloc13 (size: 24, align: 4) {
57-
0x00 │ ╾─alloc12─╼ 03 00 00 00 ╾─alloc14─╼ 03 00 00 00 │ ╾──╼....╾──╼....
58-
0x10 │ ╾─alloc15─╼ 04 00 00 00 │ ╾──╼....
56+
alloc11 (size: 24, align: 4) {
57+
0x00 │ ╾─alloc10─╼ 03 00 00 00 ╾─alloc12─╼ 03 00 00 00 │ ╾──╼....╾──╼....
58+
0x10 │ ╾─alloc13─╼ 04 00 00 00 │ ╾──╼....
5959
}
6060

61-
alloc12 (size: 3, align: 1) {
61+
alloc10 (size: 3, align: 1) {
6262
6d 65 68 │ meh
6363
}
6464

65-
alloc14 (size: 3, align: 1) {
65+
alloc12 (size: 3, align: 1) {
6666
6d 6f 70 │ mop
6767
}
6868

69-
alloc15 (size: 4, align: 1) {
69+
alloc13 (size: 4, align: 1) {
7070
6d c3 b6 70 │ m..p
7171
}

src/test/mir-opt/const_allocation/64bit/rustc.main.ConstProp.after.mir

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,46 +30,46 @@ fn main() -> () {
3030
}
3131

3232
alloc0 (static: FOO, size: 16, align: 8) {
33-
╾───────alloc17───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
33+
╾───────alloc14───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
3434
}
3535

36-
alloc17 (size: 72, align: 8) {
36+
alloc14 (size: 72, align: 8) {
3737
0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc4────────╼ │ ....░░░░╾──────╼
3838
0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
39-
0x20 │ ╾───────alloc8────────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
40-
0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc13───────╼ │ ....*...╾──────╼
39+
0x20 │ ╾───────alloc7────────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
40+
0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc11───────╼ │ ....*...╾──────╼
4141
0x40 │ 03 00 00 00 00 00 00 00 │ ........
4242
}
4343

4444
alloc4 (size: 0, align: 8) {}
4545

46-
alloc8 (size: 32, align: 8) {
47-
0x00 │ ╾───────alloc7────────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
48-
0x10 │ ╾───────alloc9────────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
46+
alloc7 (size: 32, align: 8) {
47+
0x00 │ ╾───────alloc6────────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
48+
0x10 │ ╾───────alloc8────────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
4949
}
5050

51-
alloc7 (size: 3, align: 1) {
51+
alloc6 (size: 3, align: 1) {
5252
66 6f 6f │ foo
5353
}
5454

55-
alloc9 (size: 3, align: 1) {
55+
alloc8 (size: 3, align: 1) {
5656
62 61 72 │ bar
5757
}
5858

59-
alloc13 (size: 48, align: 8) {
60-
0x00 │ ╾───────alloc12───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
61-
0x10 │ ╾───────alloc14───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
62-
0x20 │ ╾───────alloc15───────╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
59+
alloc11 (size: 48, align: 8) {
60+
0x00 │ ╾───────alloc10───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
61+
0x10 │ ╾───────alloc12───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
62+
0x20 │ ╾───────alloc13───────╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
6363
}
6464

65-
alloc12 (size: 3, align: 1) {
65+
alloc10 (size: 3, align: 1) {
6666
6d 65 68 │ meh
6767
}
6868

69-
alloc14 (size: 3, align: 1) {
69+
alloc12 (size: 3, align: 1) {
7070
6d 6f 70 │ mop
7171
}
7272

73-
alloc15 (size: 4, align: 1) {
73+
alloc13 (size: 4, align: 1) {
7474
6d c3 b6 70 │ m..p
7575
}

src/test/mir-opt/const_allocation2/32bit/rustc.main.ConstProp.after.mir

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,41 +30,41 @@ fn main() -> () {
3030
}
3131

3232
alloc0 (static: FOO, size: 8, align: 4) {
33-
╾─alloc21─╼ 03 00 00 00 │ ╾──╼....
33+
╾─alloc18─╼ 03 00 00 00 │ ╾──╼....
3434
}
3535

36-
alloc21 (size: 48, align: 4) {
36+
alloc18 (size: 48, align: 4) {
3737
0x00 │ 00 00 00 00 __ __ __ __ ╾─alloc4──╼ 00 00 00 00 │ ....░░░░╾──╼....
38-
0x10 │ 00 00 00 00 __ __ __ __ ╾─alloc9──╼ 02 00 00 00 │ ....░░░░╾──╼....
39-
0x20 │ 01 00 00 00 2a 00 00 00 ╾─alloc19─╼ 03 00 00 00 │ ....*...╾──╼....
38+
0x10 │ 00 00 00 00 __ __ __ __ ╾─alloc8──╼ 02 00 00 00 │ ....░░░░╾──╼....
39+
0x20 │ 01 00 00 00 2a 00 00 00 ╾─alloc17─╼ 03 00 00 00 │ ....*...╾──╼....
4040
}
4141

4242
alloc4 (size: 0, align: 4) {}
4343

44-
alloc9 (size: 8, align: 4) {
45-
╾─alloc7──╼ ╾─alloc8──╼ │ ╾──╼╾──╼
44+
alloc8 (size: 8, align: 4) {
45+
╾─alloc6──╼ ╾─alloc7──╼ │ ╾──╼╾──╼
4646
}
4747

48-
alloc7 (size: 1, align: 1) {
48+
alloc6 (size: 1, align: 1) {
4949
05 │ .
5050
}
5151

52-
alloc8 (size: 1, align: 1) {
52+
alloc7 (size: 1, align: 1) {
5353
06 │ .
5454
}
5555

56-
alloc19 (size: 12, align: 4) {
57-
╾─a15+0x3─╼ ╾─alloc16─╼ ╾─a18+0x2─╼ │ ╾──╼╾──╼╾──╼
56+
alloc17 (size: 12, align: 4) {
57+
╾─a13+0x3─╼ ╾─alloc14─╼ ╾─a16+0x2─╼ │ ╾──╼╾──╼╾──╼
5858
}
5959

60-
alloc15 (size: 4, align: 1) {
60+
alloc13 (size: 4, align: 1) {
6161
2a 45 15 6f │ *E.o
6262
}
6363

64-
alloc16 (size: 1, align: 1) {
64+
alloc14 (size: 1, align: 1) {
6565
2a │ *
6666
}
6767

68-
alloc18 (size: 4, align: 1) {
68+
alloc16 (size: 4, align: 1) {
6969
2a 45 15 6f │ *E.o
7070
}

src/test/mir-opt/const_allocation2/64bit/rustc.main.ConstProp.after.mir

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,44 +30,44 @@ fn main() -> () {
3030
}
3131

3232
alloc0 (static: FOO, size: 16, align: 8) {
33-
╾───────alloc21───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
33+
╾───────alloc18───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
3434
}
3535

36-
alloc21 (size: 72, align: 8) {
36+
alloc18 (size: 72, align: 8) {
3737
0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc4────────╼ │ ....░░░░╾──────╼
3838
0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
39-
0x20 │ ╾───────alloc9────────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
40-
0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc19───────╼ │ ....*...╾──────╼
39+
0x20 │ ╾───────alloc8────────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
40+
0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc17───────╼ │ ....*...╾──────╼
4141
0x40 │ 03 00 00 00 00 00 00 00 │ ........
4242
}
4343

4444
alloc4 (size: 0, align: 8) {}
4545

46-
alloc9 (size: 16, align: 8) {
47-
╾───────alloc7────────╼ ╾───────alloc8────────╼ │ ╾──────╼╾──────╼
46+
alloc8 (size: 16, align: 8) {
47+
╾───────alloc6────────╼ ╾───────alloc7────────╼ │ ╾──────╼╾──────╼
4848
}
4949

50-
alloc7 (size: 1, align: 1) {
50+
alloc6 (size: 1, align: 1) {
5151
05 │ .
5252
}
5353

54-
alloc8 (size: 1, align: 1) {
54+
alloc7 (size: 1, align: 1) {
5555
06 │ .
5656
}
5757

58-
alloc19 (size: 24, align: 8) {
59-
0x00 │ ╾─────alloc15+0x3─────╼ ╾───────alloc16───────╼ │ ╾──────╼╾──────╼
60-
0x10 │ ╾─────alloc18+0x2─────╼ │ ╾──────╼
58+
alloc17 (size: 24, align: 8) {
59+
0x00 │ ╾─────alloc13+0x3─────╼ ╾───────alloc14───────╼ │ ╾──────╼╾──────╼
60+
0x10 │ ╾─────alloc16+0x2─────╼ │ ╾──────╼
6161
}
6262

63-
alloc15 (size: 4, align: 1) {
63+
alloc13 (size: 4, align: 1) {
6464
2a 45 15 6f │ *E.o
6565
}
6666

67-
alloc16 (size: 1, align: 1) {
67+
alloc14 (size: 1, align: 1) {
6868
2a │ *
6969
}
7070

71-
alloc18 (size: 4, align: 1) {
71+
alloc16 (size: 4, align: 1) {
7272
2a 45 15 6f │ *E.o
7373
}

src/test/mir-opt/const_allocation3/32bit/rustc.main.ConstProp.after.mir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ fn main() -> () {
3030
}
3131

3232
alloc0 (static: FOO, size: 4, align: 4) {
33-
╾─alloc9──╼ │ ╾──╼
33+
╾─alloc3──╼ │ ╾──╼
3434
}
3535

36-
alloc9 (size: 168, align: 1) {
36+
alloc3 (size: 168, align: 1) {
3737
0x00 │ ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab │ ................
3838
0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾─alloc4──╼ │ ............╾──╼
3939
0x20 │ 01 ef cd ab 00 00 00 00 00 00 00 00 00 00 00 00 │ ................

src/test/mir-opt/const_allocation3/64bit/rustc.main.ConstProp.after.mir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ fn main() -> () {
3030
}
3131

3232
alloc0 (static: FOO, size: 8, align: 8) {
33-
╾───────alloc9────────╼ │ ╾──────╼
33+
╾───────alloc3────────╼ │ ╾──────╼
3434
}
3535

36-
alloc9 (size: 180, align: 1) {
36+
alloc3 (size: 180, align: 1) {
3737
0x00 │ ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab │ ................
3838
0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾──alloc4── │ ............╾───
3939
0x20 │ ──────────╼ 01 ef cd ab 00 00 00 00 00 00 00 00 │ ───╼............

src/test/mir-opt/copy_propagation/rustc.test.CopyPropagation.diff

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,14 @@
66
let mut _0: u32; // return place in scope 0 at $DIR/copy_propagation.rs:3:20: 3:23
77
let _2: u32; // in scope 0 at $DIR/copy_propagation.rs:4:9: 4:10
88
scope 1 {
9-
- debug y => _2; // in scope 1 at $DIR/copy_propagation.rs:4:9: 4:10
10-
+ debug y => _1; // in scope 1 at $DIR/copy_propagation.rs:4:9: 4:10
9+
debug y => _0; // in scope 1 at $DIR/copy_propagation.rs:4:9: 4:10
1110
}
1211

1312
bb0: {
14-
- StorageLive(_2); // scope 0 at $DIR/copy_propagation.rs:4:9: 4:10
15-
- _2 = _1; // scope 0 at $DIR/copy_propagation.rs:4:13: 4:14
16-
- _0 = _2; // scope 1 at $DIR/copy_propagation.rs:5:5: 5:6
17-
- StorageDead(_2); // scope 0 at $DIR/copy_propagation.rs:6:1: 6:2
18-
+ nop; // scope 0 at $DIR/copy_propagation.rs:4:9: 4:10
19-
+ nop; // scope 0 at $DIR/copy_propagation.rs:4:13: 4:14
20-
+ _0 = _1; // scope 1 at $DIR/copy_propagation.rs:5:5: 5:6
21-
+ nop; // scope 0 at $DIR/copy_propagation.rs:6:1: 6:2
13+
nop; // scope 0 at $DIR/copy_propagation.rs:4:9: 4:10
14+
_0 = _1; // scope 0 at $DIR/copy_propagation.rs:4:13: 4:14
15+
nop; // scope 1 at $DIR/copy_propagation.rs:5:5: 5:6
16+
nop; // scope 0 at $DIR/copy_propagation.rs:6:1: 6:2
2217
return; // scope 0 at $DIR/copy_propagation.rs:6:2: 6:2
2318
}
2419
}

src/test/mir-opt/copy_propagation_arg/rustc.arg_src.CopyPropagation.diff

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
let mut _0: i32; // return place in scope 0 at $DIR/copy_propagation_arg.rs:27:27: 27:30
77
let _2: i32; // in scope 0 at $DIR/copy_propagation_arg.rs:28:9: 28:10
88
scope 1 {
9-
debug y => _2; // in scope 1 at $DIR/copy_propagation_arg.rs:28:9: 28:10
9+
debug y => _0; // in scope 1 at $DIR/copy_propagation_arg.rs:28:9: 28:10
1010
}
1111

1212
bb0: {
13-
StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:28:9: 28:10
14-
_2 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:28:13: 28:14
13+
nop; // scope 0 at $DIR/copy_propagation_arg.rs:28:9: 28:10
14+
_0 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:28:13: 28:14
1515
_1 = const 123i32; // scope 1 at $DIR/copy_propagation_arg.rs:29:5: 29:12
1616
// ty::Const
1717
// + ty: i32
1818
// + val: Value(Scalar(0x0000007b))
1919
// mir::Constant
2020
// + span: $DIR/copy_propagation_arg.rs:29:9: 29:12
2121
// + literal: Const { ty: i32, val: Value(Scalar(0x0000007b)) }
22-
_0 = _2; // scope 1 at $DIR/copy_propagation_arg.rs:30:5: 30:6
23-
StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:31:1: 31:2
22+
nop; // scope 1 at $DIR/copy_propagation_arg.rs:30:5: 30:6
23+
nop; // scope 0 at $DIR/copy_propagation_arg.rs:31:1: 31:2
2424
return; // scope 0 at $DIR/copy_propagation_arg.rs:31:2: 31:2
2525
}
2626
}

src/test/mir-opt/copy_propagation_arg/rustc.baz.CopyPropagation.diff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +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
10+
nop; // 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+
nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
1414
_0 = const (); // scope 0 at $DIR/copy_propagation_arg.rs:21:20: 24:2
1515
// ty::Const
1616
// + ty: ()

src/test/mir-opt/copy_propagation_arg/rustc.foo.CopyPropagation.diff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
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
11+
nop; // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
1212
StorageLive(_3); // scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16
1313
_3 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16
14-
_2 = const dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
14+
_1 = const dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
1515
// ty::Const
1616
// + ty: fn(u8) -> u8 {dummy}
1717
// + val: Value(Scalar(<ZST>))
@@ -22,8 +22,8 @@
2222

2323
bb1: {
2424
StorageDead(_3); // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
25-
_1 = move _2; // scope 0 at $DIR/copy_propagation_arg.rs:11:5: 11:17
26-
StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
25+
nop; // scope 0 at $DIR/copy_propagation_arg.rs:11:5: 11:17
26+
nop; // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
2727
_0 = const (); // scope 0 at $DIR/copy_propagation_arg.rs:9:19: 12:2
2828
// ty::Const
2929
// + ty: ()

0 commit comments

Comments
 (0)