Skip to content

Commit 1f21ab1

Browse files
committed
bless mir-opt, codegen, and remaining ui tests
1 parent ae950a2 commit 1f21ab1

17 files changed

+140
-146
lines changed

src/test/codegen/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// CHECK: @STATIC = {{.*}}, align 4
1111

1212
// This checks the constants from inline_enum_const
13-
// CHECK: @alloc8 = {{.*}}, align 2
13+
// CHECK: @alloc9 = {{.*}}, align 2
1414

1515
// This checks the constants from {low,high}_align_const, they share the same
1616
// constant, but the alignment differs, so the higher one should be used

src/test/codegen/remap_path_prefix/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mod aux_mod;
1212
include!("aux_mod.rs");
1313

1414
// Here we check that the expansion of the file!() macro is mapped.
15-
// CHECK: @alloc1 = private unnamed_addr constant <{ [34 x i8] }> <{ [34 x i8] c"/the/src/remap_path_prefix/main.rs" }>, align 1
15+
// CHECK: @alloc2 = private unnamed_addr constant <{ [34 x i8] }> <{ [34 x i8] c"/the/src/remap_path_prefix/main.rs" }>, align 1
1616
pub static FILE_PATH: &'static str = file!();
1717

1818
fn main() {

src/test/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ fn main() -> () {
1616
_1 = const b"foo"; // scope 0 at $DIR/byte_slice.rs:5:13: 5:19
1717
// ty::Const
1818
// + ty: &[u8; 3]
19-
// + val: Value(Scalar(alloc0))
19+
// + val: Value(Scalar(alloc1))
2020
// mir::Constant
2121
// + span: $DIR/byte_slice.rs:5:13: 5:19
22-
// + literal: Const { ty: &[u8; 3], val: Value(Scalar(alloc0)) }
22+
// + literal: Const { ty: &[u8; 3], val: Value(Scalar(alloc1)) }
2323
StorageLive(_2); // scope 1 at $DIR/byte_slice.rs:6:9: 6:10
2424
_2 = [const 5_u8, const 120_u8]; // scope 1 at $DIR/byte_slice.rs:6:13: 6:24
2525
_0 = const (); // scope 0 at $DIR/byte_slice.rs:4:11: 7:2
@@ -29,6 +29,6 @@ fn main() -> () {
2929
}
3030
}
3131

32-
alloc0 (size: 3, align: 1) {
32+
alloc1 (size: 3, align: 1) {
3333
66 6f 6f │ foo
3434
}

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ fn main() -> () {
88
bb0: {
99
StorageLive(_1); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
1010
StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
11-
_2 = const {alloc0: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
11+
_2 = const {alloc1: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
1212
// ty::Const
1313
// + ty: &&[(std::option::Option<i32>, &[&str])]
14-
// + val: Value(Scalar(alloc0))
14+
// + val: Value(Scalar(alloc1))
1515
// mir::Constant
1616
// + span: $DIR/const_allocation.rs:8:5: 8:8
17-
// + literal: Const { ty: &&[(std::option::Option<i32>, &[&str])], val: Value(Scalar(alloc0)) }
17+
// + literal: Const { ty: &&[(std::option::Option<i32>, &[&str])], val: Value(Scalar(alloc1)) }
1818
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
1919
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
2020
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
@@ -23,43 +23,43 @@ fn main() -> () {
2323
}
2424
}
2525

26-
alloc0 (static: FOO, size: 8, align: 4) {
27-
╾─alloc17─╼ 03 00 00 00 │ ╾──╼....
26+
alloc1 (static: FOO, size: 8, align: 4) {
27+
╾─alloc18─╼ 03 00 00 00 │ ╾──╼....
2828
}
2929

30-
alloc17 (size: 48, align: 4) {
31-
0x00 │ 00 00 00 00 __ __ __ __ ╾─alloc4──╼ 00 00 00 00 │ ....░░░░╾──╼....
32-
0x10 │ 00 00 00 00 __ __ __ __ ╾─alloc8──╼ 02 00 00 00 │ ....░░░░╾──╼....
33-
0x20 │ 01 00 00 00 2a 00 00 00 ╾─alloc13─╼ 03 00 00 00 │ ....*...╾──╼....
30+
alloc18 (size: 48, align: 4) {
31+
0x00 │ 00 00 00 00 __ __ __ __ ╾─alloc5──╼ 00 00 00 00 │ ....░░░░╾──╼....
32+
0x10 │ 00 00 00 00 __ __ __ __ ╾─alloc9──╼ 02 00 00 00 │ ....░░░░╾──╼....
33+
0x20 │ 01 00 00 00 2a 00 00 00 ╾─alloc14─╼ 03 00 00 00 │ ....*...╾──╼....
3434
}
3535

36-
alloc4 (size: 0, align: 4) {}
36+
alloc5 (size: 0, align: 4) {}
3737

38-
alloc8 (size: 16, align: 4) {
39-
╾─alloc7──╼ 03 00 00 00 ╾─alloc9──╼ 03 00 00 00 │ ╾──╼....╾──╼....
38+
alloc9 (size: 16, align: 4) {
39+
╾─alloc8──╼ 03 00 00 00 ╾─alloc10─╼ 03 00 00 00 │ ╾──╼....╾──╼....
4040
}
4141

42-
alloc7 (size: 3, align: 1) {
42+
alloc8 (size: 3, align: 1) {
4343
66 6f 6f │ foo
4444
}
4545

46-
alloc9 (size: 3, align: 1) {
46+
alloc10 (size: 3, align: 1) {
4747
62 61 72 │ bar
4848
}
4949

50-
alloc13 (size: 24, align: 4) {
51-
0x00 │ ╾─alloc12─╼ 03 00 00 00 ╾─alloc14─╼ 03 00 00 00 │ ╾──╼....╾──╼....
52-
0x10 │ ╾─alloc15─╼ 04 00 00 00 │ ╾──╼....
50+
alloc14 (size: 24, align: 4) {
51+
0x00 │ ╾─alloc13─╼ 03 00 00 00 ╾─alloc15─╼ 03 00 00 00 │ ╾──╼....╾──╼....
52+
0x10 │ ╾─alloc16─╼ 04 00 00 00 │ ╾──╼....
5353
}
5454

55-
alloc12 (size: 3, align: 1) {
55+
alloc13 (size: 3, align: 1) {
5656
6d 65 68 │ meh
5757
}
5858

59-
alloc14 (size: 3, align: 1) {
59+
alloc15 (size: 3, align: 1) {
6060
6d 6f 70 │ mop
6161
}
6262

63-
alloc15 (size: 4, align: 1) {
63+
alloc16 (size: 4, align: 1) {
6464
6d c3 b6 70 │ m..p
6565
}

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

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ fn main() -> () {
88
bb0: {
99
StorageLive(_1); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
1010
StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
11-
_2 = const {alloc0: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
11+
_2 = const {alloc1: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
1212
// ty::Const
1313
// + ty: &&[(std::option::Option<i32>, &[&str])]
14-
// + val: Value(Scalar(alloc0))
14+
// + val: Value(Scalar(alloc1))
1515
// mir::Constant
1616
// + span: $DIR/const_allocation.rs:8:5: 8:8
17-
// + literal: Const { ty: &&[(std::option::Option<i32>, &[&str])], val: Value(Scalar(alloc0)) }
17+
// + literal: Const { ty: &&[(std::option::Option<i32>, &[&str])], val: Value(Scalar(alloc1)) }
1818
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
1919
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
2020
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
@@ -23,47 +23,47 @@ fn main() -> () {
2323
}
2424
}
2525

26-
alloc0 (static: FOO, size: 16, align: 8) {
27-
╾───────alloc17───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
26+
alloc1 (static: FOO, size: 16, align: 8) {
27+
╾───────alloc18───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
2828
}
2929

30-
alloc17 (size: 72, align: 8) {
31-
0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc4────────╼ │ ....░░░░╾──────╼
30+
alloc18 (size: 72, align: 8) {
31+
0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc5────────╼ │ ....░░░░╾──────╼
3232
0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
33-
0x20 │ ╾───────alloc8────────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
34-
0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc13───────╼ │ ....*...╾──────╼
33+
0x20 │ ╾───────alloc9────────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
34+
0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc14───────╼ │ ....*...╾──────╼
3535
0x40 │ 03 00 00 00 00 00 00 00 │ ........
3636
}
3737

38-
alloc4 (size: 0, align: 8) {}
38+
alloc5 (size: 0, align: 8) {}
3939

40-
alloc8 (size: 32, align: 8) {
41-
0x00 │ ╾───────alloc7────────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
42-
0x10 │ ╾───────alloc9────────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
40+
alloc9 (size: 32, align: 8) {
41+
0x00 │ ╾───────alloc8────────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
42+
0x10 │ ╾───────alloc10───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
4343
}
4444

45-
alloc7 (size: 3, align: 1) {
45+
alloc8 (size: 3, align: 1) {
4646
66 6f 6f │ foo
4747
}
4848

49-
alloc9 (size: 3, align: 1) {
49+
alloc10 (size: 3, align: 1) {
5050
62 61 72 │ bar
5151
}
5252

53-
alloc13 (size: 48, align: 8) {
54-
0x00 │ ╾───────alloc12───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
55-
0x10 │ ╾───────alloc14───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
56-
0x20 │ ╾───────alloc15───────╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
53+
alloc14 (size: 48, align: 8) {
54+
0x00 │ ╾───────alloc13───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
55+
0x10 │ ╾───────alloc15───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
56+
0x20 │ ╾───────alloc16───────╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
5757
}
5858

59-
alloc12 (size: 3, align: 1) {
59+
alloc13 (size: 3, align: 1) {
6060
6d 65 68 │ meh
6161
}
6262

63-
alloc14 (size: 3, align: 1) {
63+
alloc15 (size: 3, align: 1) {
6464
6d 6f 70 │ mop
6565
}
6666

67-
alloc15 (size: 4, align: 1) {
67+
alloc16 (size: 4, align: 1) {
6868
6d c3 b6 70 │ m..p
6969
}

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ fn main() -> () {
88
bb0: {
99
StorageLive(_1); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
1010
StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
11-
_2 = const {alloc0: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
11+
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
1212
// ty::Const
1313
// + ty: &&[(std::option::Option<i32>, &[&u8])]
14-
// + val: Value(Scalar(alloc0))
14+
// + val: Value(Scalar(alloc1))
1515
// mir::Constant
1616
// + span: $DIR/const_allocation2.rs:5:5: 5:8
17-
// + literal: Const { ty: &&[(std::option::Option<i32>, &[&u8])], val: Value(Scalar(alloc0)) }
17+
// + literal: Const { ty: &&[(std::option::Option<i32>, &[&u8])], val: Value(Scalar(alloc1)) }
1818
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
1919
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
2020
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
@@ -23,42 +23,42 @@ fn main() -> () {
2323
}
2424
}
2525

26-
alloc0 (static: FOO, size: 8, align: 4) {
27-
╾─alloc27─╼ 03 00 00 00 │ ╾──╼....
26+
alloc1 (static: FOO, size: 8, align: 4) {
27+
╾─alloc28─╼ 03 00 00 00 │ ╾──╼....
2828
}
2929

30-
alloc27 (size: 48, align: 4) {
31-
0x00 │ 00 00 00 00 __ __ __ __ ╾─alloc12─╼ 00 00 00 00 │ ....░░░░╾──╼....
32-
0x10 │ 00 00 00 00 __ __ __ __ ╾─alloc17─╼ 02 00 00 00 │ ....░░░░╾──╼....
33-
0x20 │ 01 00 00 00 2a 00 00 00 ╾─alloc25─╼ 03 00 00 00 │ ....*...╾──╼....
30+
alloc28 (size: 48, align: 4) {
31+
0x00 │ 00 00 00 00 __ __ __ __ ╾─alloc13─╼ 00 00 00 00 │ ....░░░░╾──╼....
32+
0x10 │ 00 00 00 00 __ __ __ __ ╾─alloc18─╼ 02 00 00 00 │ ....░░░░╾──╼....
33+
0x20 │ 01 00 00 00 2a 00 00 00 ╾─alloc26─╼ 03 00 00 00 │ ....*...╾──╼....
3434
}
3535

36-
alloc12 (size: 0, align: 4) {}
36+
alloc13 (size: 0, align: 4) {}
3737

38-
alloc17 (size: 8, align: 4) {
39-
╾─alloc15─╼ ╾─alloc16─╼ │ ╾──╼╾──╼
38+
alloc18 (size: 8, align: 4) {
39+
╾─alloc16─╼ ╾─alloc17─╼ │ ╾──╼╾──╼
4040
}
4141

42-
alloc15 (size: 1, align: 1) {
42+
alloc16 (size: 1, align: 1) {
4343
05 │ .
4444
}
4545

46-
alloc16 (size: 1, align: 1) {
46+
alloc17 (size: 1, align: 1) {
4747
06 │ .
4848
}
4949

50-
alloc25 (size: 12, align: 4) {
51-
╾─a21+0x3─╼ ╾─alloc22─╼ ╾─a24+0x2─╼ │ ╾──╼╾──╼╾──╼
50+
alloc26 (size: 12, align: 4) {
51+
╾─a22+0x3─╼ ╾─alloc23─╼ ╾─a25+0x2─╼ │ ╾──╼╾──╼╾──╼
5252
}
5353

54-
alloc21 (size: 4, align: 1) {
54+
alloc22 (size: 4, align: 1) {
5555
2a 45 15 6f │ *E.o
5656
}
5757

58-
alloc22 (size: 1, align: 1) {
58+
alloc23 (size: 1, align: 1) {
5959
2a │ *
6060
}
6161

62-
alloc24 (size: 4, align: 1) {
62+
alloc25 (size: 4, align: 1) {
6363
2a 45 15 6f │ *E.o
6464
}

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ fn main() -> () {
88
bb0: {
99
StorageLive(_1); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
1010
StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
11-
_2 = const {alloc0: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
11+
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
1212
// ty::Const
1313
// + ty: &&[(std::option::Option<i32>, &[&u8])]
14-
// + val: Value(Scalar(alloc0))
14+
// + val: Value(Scalar(alloc1))
1515
// mir::Constant
1616
// + span: $DIR/const_allocation2.rs:5:5: 5:8
17-
// + literal: Const { ty: &&[(std::option::Option<i32>, &[&u8])], val: Value(Scalar(alloc0)) }
17+
// + literal: Const { ty: &&[(std::option::Option<i32>, &[&u8])], val: Value(Scalar(alloc1)) }
1818
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
1919
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
2020
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
@@ -23,45 +23,45 @@ fn main() -> () {
2323
}
2424
}
2525

26-
alloc0 (static: FOO, size: 16, align: 8) {
27-
╾───────alloc27───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
26+
alloc1 (static: FOO, size: 16, align: 8) {
27+
╾───────alloc28───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
2828
}
2929

30-
alloc27 (size: 72, align: 8) {
31-
0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc12───────╼ │ ....░░░░╾──────╼
30+
alloc28 (size: 72, align: 8) {
31+
0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc13───────╼ │ ....░░░░╾──────╼
3232
0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
33-
0x20 │ ╾───────alloc17───────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
34-
0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc25───────╼ │ ....*...╾──────╼
33+
0x20 │ ╾───────alloc18───────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
34+
0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc26───────╼ │ ....*...╾──────╼
3535
0x40 │ 03 00 00 00 00 00 00 00 │ ........
3636
}
3737

38-
alloc12 (size: 0, align: 8) {}
38+
alloc13 (size: 0, align: 8) {}
3939

40-
alloc17 (size: 16, align: 8) {
41-
╾───────alloc15───────╼ ╾───────alloc16───────╼ │ ╾──────╼╾──────╼
40+
alloc18 (size: 16, align: 8) {
41+
╾───────alloc16───────╼ ╾───────alloc17───────╼ │ ╾──────╼╾──────╼
4242
}
4343

44-
alloc15 (size: 1, align: 1) {
44+
alloc16 (size: 1, align: 1) {
4545
05 │ .
4646
}
4747

48-
alloc16 (size: 1, align: 1) {
48+
alloc17 (size: 1, align: 1) {
4949
06 │ .
5050
}
5151

52-
alloc25 (size: 24, align: 8) {
53-
0x00 │ ╾─────alloc21+0x3─────╼ ╾───────alloc22───────╼ │ ╾──────╼╾──────╼
54-
0x10 │ ╾─────alloc24+0x2─────╼ │ ╾──────╼
52+
alloc26 (size: 24, align: 8) {
53+
0x00 │ ╾─────alloc22+0x3─────╼ ╾───────alloc23───────╼ │ ╾──────╼╾──────╼
54+
0x10 │ ╾─────alloc25+0x2─────╼ │ ╾──────╼
5555
}
5656

57-
alloc21 (size: 4, align: 1) {
57+
alloc22 (size: 4, align: 1) {
5858
2a 45 15 6f │ *E.o
5959
}
6060

61-
alloc22 (size: 1, align: 1) {
61+
alloc23 (size: 1, align: 1) {
6262
2a │ *
6363
}
6464

65-
alloc24 (size: 4, align: 1) {
65+
alloc25 (size: 4, align: 1) {
6666
2a 45 15 6f │ *E.o
6767
}

0 commit comments

Comments
 (0)