Skip to content

Commit dfc469d

Browse files
committed
Run the test with explicit -O such that Add is generated instead of CheckedAdd
This makes the test run deterministic regardless of noopt testruns
1 parent 2bb3844 commit dfc469d

6 files changed

+198
-197
lines changed

src/test/mir-opt/inst_combine_deref.deep_opt.InstCombine.diff

+65-65
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,37 @@
22
+ // MIR for `deep_opt` after InstCombine
33

44
fn deep_opt() -> (u64, u64, u64) {
5-
let mut _0: (u64, u64, u64); // return place in scope 0 at $DIR/inst_combine_deref.rs:10:18: 10:33
6-
let _1: u64; // in scope 0 at $DIR/inst_combine_deref.rs:11:9: 11:11
7-
let mut _10: u64; // in scope 0 at $DIR/inst_combine_deref.rs:20:6: 20:8
8-
let mut _11: u64; // in scope 0 at $DIR/inst_combine_deref.rs:20:10: 20:12
9-
let mut _12: u64; // in scope 0 at $DIR/inst_combine_deref.rs:20:14: 20:16
5+
let mut _0: (u64, u64, u64); // return place in scope 0 at $DIR/inst_combine_deref.rs:11:18: 11:33
6+
let _1: u64; // in scope 0 at $DIR/inst_combine_deref.rs:12:9: 12:11
7+
let mut _10: u64; // in scope 0 at $DIR/inst_combine_deref.rs:21:6: 21:8
8+
let mut _11: u64; // in scope 0 at $DIR/inst_combine_deref.rs:21:10: 21:12
9+
let mut _12: u64; // in scope 0 at $DIR/inst_combine_deref.rs:21:14: 21:16
1010
scope 1 {
11-
debug x1 => _1; // in scope 1 at $DIR/inst_combine_deref.rs:11:9: 11:11
12-
let _2: u64; // in scope 1 at $DIR/inst_combine_deref.rs:12:9: 12:11
11+
debug x1 => _1; // in scope 1 at $DIR/inst_combine_deref.rs:12:9: 12:11
12+
let _2: u64; // in scope 1 at $DIR/inst_combine_deref.rs:13:9: 13:11
1313
scope 2 {
14-
debug x2 => _2; // in scope 2 at $DIR/inst_combine_deref.rs:12:9: 12:11
15-
let _3: u64; // in scope 2 at $DIR/inst_combine_deref.rs:13:9: 13:11
14+
debug x2 => _2; // in scope 2 at $DIR/inst_combine_deref.rs:13:9: 13:11
15+
let _3: u64; // in scope 2 at $DIR/inst_combine_deref.rs:14:9: 14:11
1616
scope 3 {
17-
debug x3 => _3; // in scope 3 at $DIR/inst_combine_deref.rs:13:9: 13:11
18-
let _4: &u64; // in scope 3 at $DIR/inst_combine_deref.rs:14:9: 14:11
17+
debug x3 => _3; // in scope 3 at $DIR/inst_combine_deref.rs:14:9: 14:11
18+
let _4: &u64; // in scope 3 at $DIR/inst_combine_deref.rs:15:9: 15:11
1919
scope 4 {
20-
debug y1 => _4; // in scope 4 at $DIR/inst_combine_deref.rs:14:9: 14:11
21-
let _5: &u64; // in scope 4 at $DIR/inst_combine_deref.rs:15:9: 15:11
20+
debug y1 => _4; // in scope 4 at $DIR/inst_combine_deref.rs:15:9: 15:11
21+
let _5: &u64; // in scope 4 at $DIR/inst_combine_deref.rs:16:9: 16:11
2222
scope 5 {
23-
debug y2 => _5; // in scope 5 at $DIR/inst_combine_deref.rs:15:9: 15:11
24-
let _6: &u64; // in scope 5 at $DIR/inst_combine_deref.rs:16:9: 16:11
23+
debug y2 => _5; // in scope 5 at $DIR/inst_combine_deref.rs:16:9: 16:11
24+
let _6: &u64; // in scope 5 at $DIR/inst_combine_deref.rs:17:9: 17:11
2525
scope 6 {
26-
debug y3 => _6; // in scope 6 at $DIR/inst_combine_deref.rs:16:9: 16:11
27-
let _7: u64; // in scope 6 at $DIR/inst_combine_deref.rs:17:9: 17:11
26+
debug y3 => _6; // in scope 6 at $DIR/inst_combine_deref.rs:17:9: 17:11
27+
let _7: u64; // in scope 6 at $DIR/inst_combine_deref.rs:18:9: 18:11
2828
scope 7 {
29-
debug z1 => _7; // in scope 7 at $DIR/inst_combine_deref.rs:17:9: 17:11
30-
let _8: u64; // in scope 7 at $DIR/inst_combine_deref.rs:18:9: 18:11
29+
debug z1 => _7; // in scope 7 at $DIR/inst_combine_deref.rs:18:9: 18:11
30+
let _8: u64; // in scope 7 at $DIR/inst_combine_deref.rs:19:9: 19:11
3131
scope 8 {
32-
debug z2 => _8; // in scope 8 at $DIR/inst_combine_deref.rs:18:9: 18:11
33-
let _9: u64; // in scope 8 at $DIR/inst_combine_deref.rs:19:9: 19:11
32+
debug z2 => _8; // in scope 8 at $DIR/inst_combine_deref.rs:19:9: 19:11
33+
let _9: u64; // in scope 8 at $DIR/inst_combine_deref.rs:20:9: 20:11
3434
scope 9 {
35-
debug z3 => _9; // in scope 9 at $DIR/inst_combine_deref.rs:19:9: 19:11
35+
debug z3 => _9; // in scope 9 at $DIR/inst_combine_deref.rs:20:9: 20:11
3636
}
3737
}
3838
}
@@ -44,49 +44,49 @@
4444
}
4545

4646
bb0: {
47-
StorageLive(_1); // scope 0 at $DIR/inst_combine_deref.rs:11:9: 11:11
48-
_1 = const 1_u64; // scope 0 at $DIR/inst_combine_deref.rs:11:14: 11:15
49-
StorageLive(_2); // scope 1 at $DIR/inst_combine_deref.rs:12:9: 12:11
50-
_2 = const 2_u64; // scope 1 at $DIR/inst_combine_deref.rs:12:14: 12:15
51-
StorageLive(_3); // scope 2 at $DIR/inst_combine_deref.rs:13:9: 13:11
52-
_3 = const 3_u64; // scope 2 at $DIR/inst_combine_deref.rs:13:14: 13:15
53-
StorageLive(_4); // scope 3 at $DIR/inst_combine_deref.rs:14:9: 14:11
54-
_4 = &_1; // scope 3 at $DIR/inst_combine_deref.rs:14:14: 14:17
55-
StorageLive(_5); // scope 4 at $DIR/inst_combine_deref.rs:15:9: 15:11
56-
_5 = &_2; // scope 4 at $DIR/inst_combine_deref.rs:15:14: 15:17
57-
StorageLive(_6); // scope 5 at $DIR/inst_combine_deref.rs:16:9: 16:11
58-
_6 = &_3; // scope 5 at $DIR/inst_combine_deref.rs:16:14: 16:17
59-
StorageLive(_7); // scope 6 at $DIR/inst_combine_deref.rs:17:9: 17:11
60-
- _7 = (*_4); // scope 6 at $DIR/inst_combine_deref.rs:17:14: 17:17
61-
+ _7 = _1; // scope 6 at $DIR/inst_combine_deref.rs:17:14: 17:17
62-
StorageLive(_8); // scope 7 at $DIR/inst_combine_deref.rs:18:9: 18:11
63-
- _8 = (*_5); // scope 7 at $DIR/inst_combine_deref.rs:18:14: 18:17
64-
+ _8 = _2; // scope 7 at $DIR/inst_combine_deref.rs:18:14: 18:17
65-
StorageLive(_9); // scope 8 at $DIR/inst_combine_deref.rs:19:9: 19:11
66-
- _9 = (*_6); // scope 8 at $DIR/inst_combine_deref.rs:19:14: 19:17
67-
+ _9 = _3; // scope 8 at $DIR/inst_combine_deref.rs:19:14: 19:17
68-
StorageLive(_10); // scope 9 at $DIR/inst_combine_deref.rs:20:6: 20:8
69-
_10 = _7; // scope 9 at $DIR/inst_combine_deref.rs:20:6: 20:8
70-
StorageLive(_11); // scope 9 at $DIR/inst_combine_deref.rs:20:10: 20:12
71-
_11 = _8; // scope 9 at $DIR/inst_combine_deref.rs:20:10: 20:12
72-
StorageLive(_12); // scope 9 at $DIR/inst_combine_deref.rs:20:14: 20:16
73-
_12 = _9; // scope 9 at $DIR/inst_combine_deref.rs:20:14: 20:16
74-
(_0.0: u64) = move _10; // scope 9 at $DIR/inst_combine_deref.rs:20:5: 20:17
75-
(_0.1: u64) = move _11; // scope 9 at $DIR/inst_combine_deref.rs:20:5: 20:17
76-
(_0.2: u64) = move _12; // scope 9 at $DIR/inst_combine_deref.rs:20:5: 20:17
77-
StorageDead(_12); // scope 9 at $DIR/inst_combine_deref.rs:20:16: 20:17
78-
StorageDead(_11); // scope 9 at $DIR/inst_combine_deref.rs:20:16: 20:17
79-
StorageDead(_10); // scope 9 at $DIR/inst_combine_deref.rs:20:16: 20:17
80-
StorageDead(_9); // scope 8 at $DIR/inst_combine_deref.rs:21:1: 21:2
81-
StorageDead(_8); // scope 7 at $DIR/inst_combine_deref.rs:21:1: 21:2
82-
StorageDead(_7); // scope 6 at $DIR/inst_combine_deref.rs:21:1: 21:2
83-
StorageDead(_6); // scope 5 at $DIR/inst_combine_deref.rs:21:1: 21:2
84-
StorageDead(_5); // scope 4 at $DIR/inst_combine_deref.rs:21:1: 21:2
85-
StorageDead(_4); // scope 3 at $DIR/inst_combine_deref.rs:21:1: 21:2
86-
StorageDead(_3); // scope 2 at $DIR/inst_combine_deref.rs:21:1: 21:2
87-
StorageDead(_2); // scope 1 at $DIR/inst_combine_deref.rs:21:1: 21:2
88-
StorageDead(_1); // scope 0 at $DIR/inst_combine_deref.rs:21:1: 21:2
89-
return; // scope 0 at $DIR/inst_combine_deref.rs:21:2: 21:2
47+
StorageLive(_1); // scope 0 at $DIR/inst_combine_deref.rs:12:9: 12:11
48+
_1 = const 1_u64; // scope 0 at $DIR/inst_combine_deref.rs:12:14: 12:15
49+
StorageLive(_2); // scope 1 at $DIR/inst_combine_deref.rs:13:9: 13:11
50+
_2 = const 2_u64; // scope 1 at $DIR/inst_combine_deref.rs:13:14: 13:15
51+
StorageLive(_3); // scope 2 at $DIR/inst_combine_deref.rs:14:9: 14:11
52+
_3 = const 3_u64; // scope 2 at $DIR/inst_combine_deref.rs:14:14: 14:15
53+
StorageLive(_4); // scope 3 at $DIR/inst_combine_deref.rs:15:9: 15:11
54+
_4 = &_1; // scope 3 at $DIR/inst_combine_deref.rs:15:14: 15:17
55+
StorageLive(_5); // scope 4 at $DIR/inst_combine_deref.rs:16:9: 16:11
56+
_5 = &_2; // scope 4 at $DIR/inst_combine_deref.rs:16:14: 16:17
57+
StorageLive(_6); // scope 5 at $DIR/inst_combine_deref.rs:17:9: 17:11
58+
_6 = &_3; // scope 5 at $DIR/inst_combine_deref.rs:17:14: 17:17
59+
StorageLive(_7); // scope 6 at $DIR/inst_combine_deref.rs:18:9: 18:11
60+
- _7 = (*_4); // scope 6 at $DIR/inst_combine_deref.rs:18:14: 18:17
61+
+ _7 = _1; // scope 6 at $DIR/inst_combine_deref.rs:18:14: 18:17
62+
StorageLive(_8); // scope 7 at $DIR/inst_combine_deref.rs:19:9: 19:11
63+
- _8 = (*_5); // scope 7 at $DIR/inst_combine_deref.rs:19:14: 19:17
64+
+ _8 = _2; // scope 7 at $DIR/inst_combine_deref.rs:19:14: 19:17
65+
StorageLive(_9); // scope 8 at $DIR/inst_combine_deref.rs:20:9: 20:11
66+
- _9 = (*_6); // scope 8 at $DIR/inst_combine_deref.rs:20:14: 20:17
67+
+ _9 = _3; // scope 8 at $DIR/inst_combine_deref.rs:20:14: 20:17
68+
StorageLive(_10); // scope 9 at $DIR/inst_combine_deref.rs:21:6: 21:8
69+
_10 = _7; // scope 9 at $DIR/inst_combine_deref.rs:21:6: 21:8
70+
StorageLive(_11); // scope 9 at $DIR/inst_combine_deref.rs:21:10: 21:12
71+
_11 = _8; // scope 9 at $DIR/inst_combine_deref.rs:21:10: 21:12
72+
StorageLive(_12); // scope 9 at $DIR/inst_combine_deref.rs:21:14: 21:16
73+
_12 = _9; // scope 9 at $DIR/inst_combine_deref.rs:21:14: 21:16
74+
(_0.0: u64) = move _10; // scope 9 at $DIR/inst_combine_deref.rs:21:5: 21:17
75+
(_0.1: u64) = move _11; // scope 9 at $DIR/inst_combine_deref.rs:21:5: 21:17
76+
(_0.2: u64) = move _12; // scope 9 at $DIR/inst_combine_deref.rs:21:5: 21:17
77+
StorageDead(_12); // scope 9 at $DIR/inst_combine_deref.rs:21:16: 21:17
78+
StorageDead(_11); // scope 9 at $DIR/inst_combine_deref.rs:21:16: 21:17
79+
StorageDead(_10); // scope 9 at $DIR/inst_combine_deref.rs:21:16: 21:17
80+
StorageDead(_9); // scope 8 at $DIR/inst_combine_deref.rs:22:1: 22:2
81+
StorageDead(_8); // scope 7 at $DIR/inst_combine_deref.rs:22:1: 22:2
82+
StorageDead(_7); // scope 6 at $DIR/inst_combine_deref.rs:22:1: 22:2
83+
StorageDead(_6); // scope 5 at $DIR/inst_combine_deref.rs:22:1: 22:2
84+
StorageDead(_5); // scope 4 at $DIR/inst_combine_deref.rs:22:1: 22:2
85+
StorageDead(_4); // scope 3 at $DIR/inst_combine_deref.rs:22:1: 22:2
86+
StorageDead(_3); // scope 2 at $DIR/inst_combine_deref.rs:22:1: 22:2
87+
StorageDead(_2); // scope 1 at $DIR/inst_combine_deref.rs:22:1: 22:2
88+
StorageDead(_1); // scope 0 at $DIR/inst_combine_deref.rs:22:1: 22:2
89+
return; // scope 0 at $DIR/inst_combine_deref.rs:22:2: 22:2
9090
}
9191
}
9292

0 commit comments

Comments
 (0)