Skip to content

Commit 9903968

Browse files
committed
Adjust mir-opt tests for new HIR without If
1 parent 5cccda1 commit 9903968

File tree

4 files changed

+26
-21
lines changed

4 files changed

+26
-21
lines changed

src/test/mir-opt/issue-38669.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,17 @@ fn main() {
2727
// bb3: {
2828
// StorageLive(_4);
2929
// _4 = _1;
30-
// switchInt(move _4) -> [false: bb5, otherwise: bb4];
30+
// FakeRead(ForMatchedPlace, _4);
31+
// switchInt(_4) -> [false: bb5, otherwise: bb4];
3132
// }
32-
// bb4: {
33+
// ...
34+
// bb7: {
3335
// _0 = ();
3436
// StorageDead(_4);
3537
// StorageDead(_1);
3638
// return;
3739
// }
38-
// bb5: {
40+
// bb8: {
3941
// _3 = ();
4042
// StorageDead(_4);
4143
// _1 = const true;

src/test/mir-opt/loop_test.rs

+11-10
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,20 @@ fn main() {
2222
// resume;
2323
// }
2424
// ...
25-
// bb3: { // Entry into the loop
25+
// bb6: { // Entry into the loop
2626
// _1 = ();
27-
// goto -> bb4;
27+
// StorageDead(_2);
28+
// goto -> bb7;
2829
// }
29-
// bb4: { // The loop_block
30-
// falseUnwind -> [real: bb5, cleanup: bb1];
30+
// bb7: { // The loop_block
31+
// falseUnwind -> [real: bb8, cleanup: bb1];
3132
// }
32-
// bb5: { // The loop body (body_block)
33-
// StorageLive(_5);
34-
// _5 = const 1i32;
35-
// FakeRead(ForLet, _5);
36-
// StorageDead(_5);
37-
// goto -> bb4;
33+
// bb8: { // The loop body (body_block)
34+
// StorageLive(_6);
35+
// _6 = const 1i32;
36+
// FakeRead(ForLet, _6);
37+
// StorageDead(_6);
38+
// goto -> bb7;
3839
// }
3940
// ...
4041
// END rustc.main.SimplifyCfg-qualify-consts.after.mir

src/test/mir-opt/nll/region-subtyping-basic.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ fn main() {
2222

2323
// END RUST SOURCE
2424
// START rustc.main.nll.0.mir
25-
// | '_#2r | U0 | {bb2[0..=5], bb3[0..=1]}
26-
// | '_#3r | U0 | {bb2[1..=5], bb3[0..=1]}
27-
// | '_#4r | U0 | {bb2[4..=5], bb3[0..=1]}
25+
// | '_#2r | U0 | {bb2[0..=8], bb3[0], bb6[0..=1]}
26+
// | '_#3r | U0 | {bb2[1..=8], bb3[0], bb6[0..=1]}
27+
// | '_#4r | U0 | {bb2[4..=8], bb3[0], bb6[0..=1]}
2828
// END rustc.main.nll.0.mir
2929
// START rustc.main.nll.0.mir
3030
// let _2: &'_#3r usize;

src/test/mir-opt/simplify_if.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ fn main() {
55
}
66

77
// END RUST SOURCE
8-
// START rustc.main.SimplifyBranches-initial.before.mir
8+
// START rustc.main.SimplifyBranches-after-copy-prop.before.mir
99
// bb0: {
10-
// switchInt(const false) -> [false: bb3, otherwise: bb2];
10+
// ...
11+
// switchInt(const false) -> [false: bb3, otherwise: bb1];
1112
// }
12-
// END rustc.main.SimplifyBranches-initial.before.mir
13-
// START rustc.main.SimplifyBranches-initial.after.mir
13+
// END rustc.main.SimplifyBranches-after-copy-prop.before.mir
14+
// START rustc.main.SimplifyBranches-after-copy-prop.after.mir
1415
// bb0: {
16+
// ...
1517
// goto -> bb3;
1618
// }
17-
// END rustc.main.SimplifyBranches-initial.after.mir
19+
// END rustc.main.SimplifyBranches-after-copy-prop.after.mir

0 commit comments

Comments
 (0)