Skip to content

Commit bebe67e

Browse files
committed
./x.py test --bless
1 parent dfcb771 commit bebe67e

File tree

42 files changed

+949
-429
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

+949
-429
lines changed

src/test/codegen/try_identity.rs

-34
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
- // MIR for `chain` before CopyPropagation
2+
+ // MIR for `chain` after CopyPropagation
3+
4+
fn chain(_1: T) -> T {
5+
debug a => _1; // in scope 0 at $DIR/copy_propagation.rs:16:23: 16:28
6+
let mut _2: T; // in scope 0 at $DIR/copy_propagation.rs:17:9: 17:14
7+
let mut _4: T; // in scope 0 at $DIR/copy_propagation.rs:19:9: 19:10
8+
let mut _5: T; // in scope 0 at $DIR/copy_propagation.rs:20:9: 20:10
9+
let mut _6: T; // in scope 0 at $DIR/copy_propagation.rs:21:9: 21:10
10+
let mut _7: T; // in scope 0 at $DIR/copy_propagation.rs:22:9: 22:10
11+
let mut _8: T; // in scope 0 at $DIR/copy_propagation.rs:23:9: 23:10
12+
scope 1 {
13+
debug b => _2; // in scope 1 at $DIR/copy_propagation.rs:17:9: 17:14
14+
let mut _3: T; // in scope 1 at $DIR/copy_propagation.rs:18:9: 18:14
15+
scope 2 {
16+
debug c => _3; // in scope 2 at $DIR/copy_propagation.rs:18:9: 18:14
17+
let mut _0: T; // return place in scope 2 at $DIR/copy_propagation.rs:25:9: 25:10
18+
let _9: T; // in scope 2 at $DIR/copy_propagation.rs:25:9: 25:10
19+
scope 3 {
20+
debug d => _0; // in scope 3 at $DIR/copy_propagation.rs:25:9: 25:10
21+
}
22+
}
23+
}
24+
25+
bb0: {
26+
StorageLive(_2); // scope 0 at $DIR/copy_propagation.rs:17:9: 17:14
27+
StorageLive(_3); // scope 1 at $DIR/copy_propagation.rs:18:9: 18:14
28+
StorageLive(_4); // scope 2 at $DIR/copy_propagation.rs:19:9: 19:10
29+
_4 = _1; // scope 2 at $DIR/copy_propagation.rs:19:9: 19:10
30+
- _2 = move _4; // scope 2 at $DIR/copy_propagation.rs:19:5: 19:10
31+
+ _2 = _1; // scope 2 at $DIR/copy_propagation.rs:19:5: 19:10
32+
StorageDead(_4); // scope 2 at $DIR/copy_propagation.rs:19:9: 19:10
33+
StorageLive(_5); // scope 2 at $DIR/copy_propagation.rs:20:9: 20:10
34+
- _5 = _2; // scope 2 at $DIR/copy_propagation.rs:20:9: 20:10
35+
- _3 = move _5; // scope 2 at $DIR/copy_propagation.rs:20:5: 20:10
36+
+ _5 = _1; // scope 2 at $DIR/copy_propagation.rs:20:9: 20:10
37+
+ _3 = _1; // scope 2 at $DIR/copy_propagation.rs:20:5: 20:10
38+
StorageDead(_5); // scope 2 at $DIR/copy_propagation.rs:20:9: 20:10
39+
StorageLive(_6); // scope 2 at $DIR/copy_propagation.rs:21:9: 21:10
40+
- _6 = _3; // scope 2 at $DIR/copy_propagation.rs:21:9: 21:10
41+
- _1 = move _6; // scope 2 at $DIR/copy_propagation.rs:21:5: 21:10
42+
+ _6 = _1; // scope 2 at $DIR/copy_propagation.rs:21:9: 21:10
43+
+ _1 = _6; // scope 2 at $DIR/copy_propagation.rs:21:5: 21:10
44+
StorageDead(_6); // scope 2 at $DIR/copy_propagation.rs:21:9: 21:10
45+
StorageLive(_7); // scope 2 at $DIR/copy_propagation.rs:22:9: 22:10
46+
_7 = _1; // scope 2 at $DIR/copy_propagation.rs:22:9: 22:10
47+
- _2 = move _7; // scope 2 at $DIR/copy_propagation.rs:22:5: 22:10
48+
+ _2 = _1; // scope 2 at $DIR/copy_propagation.rs:22:5: 22:10
49+
StorageDead(_7); // scope 2 at $DIR/copy_propagation.rs:22:9: 22:10
50+
StorageLive(_8); // scope 2 at $DIR/copy_propagation.rs:23:9: 23:10
51+
- _8 = _2; // scope 2 at $DIR/copy_propagation.rs:23:9: 23:10
52+
- _3 = move _8; // scope 2 at $DIR/copy_propagation.rs:23:5: 23:10
53+
+ _8 = _1; // scope 2 at $DIR/copy_propagation.rs:23:9: 23:10
54+
+ _3 = _1; // scope 2 at $DIR/copy_propagation.rs:23:5: 23:10
55+
StorageDead(_8); // scope 2 at $DIR/copy_propagation.rs:23:9: 23:10
56+
- _0 = _3; // scope 2 at $DIR/copy_propagation.rs:25:13: 25:14
57+
+ _0 = _1; // scope 2 at $DIR/copy_propagation.rs:25:13: 25:14
58+
StorageDead(_3); // scope 1 at $DIR/copy_propagation.rs:27:1: 27:2
59+
StorageDead(_2); // scope 0 at $DIR/copy_propagation.rs:27:1: 27:2
60+
return; // scope 0 at $DIR/copy_propagation.rs:27:2: 27:2
61+
}
62+
}
63+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
- // MIR for `id` before CopyPropagation
2+
+ // MIR for `id` after CopyPropagation
3+
4+
fn id(_1: T) -> T {
5+
debug a => _1; // in scope 0 at $DIR/copy_propagation.rs:9:20: 9:25
6+
let mut _0: T; // return place in scope 0 at $DIR/copy_propagation.rs:9:33: 9:34
7+
let mut _2: T; // in scope 0 at $DIR/copy_propagation.rs:11:9: 11:10
8+
9+
bb0: {
10+
StorageLive(_2); // scope 0 at $DIR/copy_propagation.rs:11:9: 11:10
11+
_2 = _1; // scope 0 at $DIR/copy_propagation.rs:11:9: 11:10
12+
- _1 = move _2; // scope 0 at $DIR/copy_propagation.rs:11:5: 11:10
13+
+ _1 = _2; // scope 0 at $DIR/copy_propagation.rs:11:5: 11:10
14+
StorageDead(_2); // scope 0 at $DIR/copy_propagation.rs:11:9: 11:10
15+
_0 = _1; // scope 0 at $DIR/copy_propagation.rs:12:5: 12:6
16+
return; // scope 0 at $DIR/copy_propagation.rs:13:2: 13:2
17+
}
18+
}
19+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
- // MIR for `write` before CopyPropagation
2+
+ // MIR for `write` after CopyPropagation
3+
4+
fn write(_1: &mut T, _2: T) -> () {
5+
debug dst => _1; // in scope 0 at $DIR/copy_propagation.rs:4:23: 4:26
6+
debug value => _2; // in scope 0 at $DIR/copy_propagation.rs:4:36: 4:41
7+
let mut _0: (); // return place in scope 0 at $DIR/copy_propagation.rs:4:46: 4:46
8+
let mut _3: T; // in scope 0 at $DIR/copy_propagation.rs:5:12: 5:17
9+
10+
bb0: {
11+
StorageLive(_3); // scope 0 at $DIR/copy_propagation.rs:5:12: 5:17
12+
_3 = _2; // scope 0 at $DIR/copy_propagation.rs:5:12: 5:17
13+
- (*_1) = move _3; // scope 0 at $DIR/copy_propagation.rs:5:5: 5:17
14+
+ (*_1) = _2; // scope 0 at $DIR/copy_propagation.rs:5:5: 5:17
15+
StorageDead(_3); // scope 0 at $DIR/copy_propagation.rs:5:16: 5:17
16+
return; // scope 0 at $DIR/copy_propagation.rs:6:2: 6:2
17+
}
18+
}
19+

src/test/mir-opt/deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
StorageLive(_3); // scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:12
2323
_3 = _1; // scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:12
2424
StorageLive(_8); // scope 2 at $DIR/deduplicate_blocks.rs:3:11: 3:23
25-
_8 = _3; // scope 2 at $DIR/deduplicate_blocks.rs:3:11: 3:23
25+
_8 = _1; // scope 2 at $DIR/deduplicate_blocks.rs:3:11: 3:23
2626
- _2 = transmute::<&str, &[u8]>(move _8) -> bb14; // scope 2 at $DIR/deduplicate_blocks.rs:3:11: 3:23
2727
+ _2 = transmute::<&str, &[u8]>(move _8) -> bb12; // scope 2 at $DIR/deduplicate_blocks.rs:3:11: 3:23
2828
// mir::Constant
@@ -49,8 +49,8 @@
4949

5050
bb5: {
5151
_4 = Len((*_2)); // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
52-
_5 = Ge(move _4, const 3_usize); // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
53-
switchInt(move _5) -> [false: bb9, otherwise: bb6]; // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
52+
_5 = Ge(_4, const 3_usize); // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
53+
switchInt(_5) -> [false: bb9, otherwise: bb6]; // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
5454
}
5555

5656
bb6: {
@@ -100,8 +100,8 @@
100100
StorageDead(_8); // scope 2 at $DIR/deduplicate_blocks.rs:3:11: 3:23
101101
StorageDead(_3); // scope 0 at $DIR/deduplicate_blocks.rs:3:22: 3:23
102102
_6 = Len((*_2)); // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
103-
_7 = Ge(move _6, const 4_usize); // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
104-
switchInt(move _7) -> [false: bb5, otherwise: bb1]; // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
103+
_7 = Ge(_6, const 4_usize); // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
104+
switchInt(_7) -> [false: bb5, otherwise: bb1]; // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
105105
}
106106
}
107107

src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir

+1-9
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ fn bar() -> bool {
1111
scope 2 (inlined foo) { // at $DIR/inline-any-operand.rs:12:5: 12:13
1212
debug x => _3; // in scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13
1313
debug y => _4; // in scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13
14-
let mut _5: i32; // in scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13
15-
let mut _6: i32; // in scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13
1614
}
1715
}
1816

@@ -28,13 +26,7 @@ fn bar() -> bool {
2826
_3 = const 1_i32; // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13
2927
StorageLive(_4); // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13
3028
_4 = const -1_i32; // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13
31-
StorageLive(_5); // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13
32-
_5 = _3; // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13
33-
StorageLive(_6); // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13
34-
_6 = _4; // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13
35-
_0 = Eq(move _5, move _6); // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13
36-
StorageDead(_6); // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13
37-
StorageDead(_5); // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13
29+
_0 = Eq(_3, _4); // scope 2 at $DIR/inline-any-operand.rs:12:5: 12:13
3830
StorageDead(_4); // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13
3931
StorageDead(_3); // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13
4032
StorageDead(_2); // scope 1 at $DIR/inline-any-operand.rs:12:12: 12:13

src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn foo(_1: T, _2: &i32) -> i32 {
4040
_9 = move (_5.1: &i32); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
4141
StorageLive(_10); // scope 2 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
4242
_10 = _8; // scope 2 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
43-
_0 = (*_10); // scope 3 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
43+
_0 = (*_8); // scope 3 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
4444
StorageDead(_10); // scope 2 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
4545
StorageDead(_9); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
4646
StorageDead(_8); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12

src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ fn foo(_1: T, _2: i32) -> (i32, T) {
4444
_10 = (*((*_6).0: &i32)); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
4545
StorageLive(_11); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
4646
_11 = (*((*_6).1: &T)); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
47-
(_0.0: i32) = move _10; // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
48-
(_0.1: T) = move _11; // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
47+
(_0.0: i32) = _10; // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
48+
(_0.1: T) = _11; // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
4949
StorageDead(_11); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
5050
StorageDead(_10); // scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
5151
StorageDead(_9); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9

src/test/mir-opt/inline/inline_cycle.two.Inline.diff

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// + literal: Const { ty: fn() {f}, val: Value(Scalar(<ZST>)) }
2828
+ StorageLive(_3); // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12
2929
+ StorageLive(_4); // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12
30-
+ _4 = move _2; // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12
30+
+ _4 = _2; // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12
3131
+ StorageLive(_5); // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12
3232
+ _5 = const (); // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12
3333
+ _3 = move _4() -> bb1; // scope 2 at $DIR/inline-cycle.rs:49:5: 49:12

src/test/mir-opt/inline/inline_diverging.h.Inline.diff

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
let mut _0: (); // return place in scope 0 at $DIR/inline-diverging.rs:21:12: 21:12
66
let _1: (!, !); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22
77
+ let mut _2: fn() -> ! {sleep}; // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22
8+
+ let mut _8: (); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22
89
+ let mut _9: (); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22
9-
+ let mut _10: (); // in scope 0 at $DIR/inline-diverging.rs:22:5: 22:22
1010
+ scope 1 (inlined call_twice::<!, fn() -> ! {sleep}>) { // at $DIR/inline-diverging.rs:22:5: 22:22
1111
+ debug f => _2; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
1212
+ let _3: !; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
1313
+ let mut _4: &fn() -> ! {sleep}; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
1414
+ let mut _6: &fn() -> ! {sleep}; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
1515
+ let mut _7: !; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
16-
+ let mut _8: !; // in scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
1716
+ scope 2 {
1817
+ debug a => _3; // in scope 2 at $DIR/inline-diverging.rs:22:5: 22:22
1918
+ let _5: !; // in scope 2 at $DIR/inline-diverging.rs:22:5: 22:22
@@ -45,8 +44,8 @@
4544
+ StorageLive(_3); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
4645
+ StorageLive(_4); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
4746
+ _4 = &_2; // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
48-
+ StorageLive(_9); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
49-
+ _9 = const (); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
47+
+ StorageLive(_8); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
48+
+ _8 = const (); // scope 1 at $DIR/inline-diverging.rs:22:5: 22:22
5049
+ goto -> bb1; // scope 4 at $DIR/inline-diverging.rs:22:5: 22:22
5150
}
5251

0 commit comments

Comments
 (0)