Skip to content

Commit

Permalink
Adjust mir-opt tests for new HIR without If
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed May 10, 2019
1 parent 5cccda1 commit 9903968
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 21 deletions.
8 changes: 5 additions & 3 deletions src/test/mir-opt/issue-38669.rs
Expand Up @@ -27,15 +27,17 @@ fn main() {
// bb3: {
// StorageLive(_4);
// _4 = _1;
// switchInt(move _4) -> [false: bb5, otherwise: bb4];
// FakeRead(ForMatchedPlace, _4);
// switchInt(_4) -> [false: bb5, otherwise: bb4];
// }
// bb4: {
// ...
// bb7: {
// _0 = ();
// StorageDead(_4);
// StorageDead(_1);
// return;
// }
// bb5: {
// bb8: {
// _3 = ();
// StorageDead(_4);
// _1 = const true;
Expand Down
21 changes: 11 additions & 10 deletions src/test/mir-opt/loop_test.rs
Expand Up @@ -22,19 +22,20 @@ fn main() {
// resume;
// }
// ...
// bb3: { // Entry into the loop
// bb6: { // Entry into the loop
// _1 = ();
// goto -> bb4;
// StorageDead(_2);
// goto -> bb7;
// }
// bb4: { // The loop_block
// falseUnwind -> [real: bb5, cleanup: bb1];
// bb7: { // The loop_block
// falseUnwind -> [real: bb8, cleanup: bb1];
// }
// bb5: { // The loop body (body_block)
// StorageLive(_5);
// _5 = const 1i32;
// FakeRead(ForLet, _5);
// StorageDead(_5);
// goto -> bb4;
// bb8: { // The loop body (body_block)
// StorageLive(_6);
// _6 = const 1i32;
// FakeRead(ForLet, _6);
// StorageDead(_6);
// goto -> bb7;
// }
// ...
// END rustc.main.SimplifyCfg-qualify-consts.after.mir
6 changes: 3 additions & 3 deletions src/test/mir-opt/nll/region-subtyping-basic.rs
Expand Up @@ -22,9 +22,9 @@ fn main() {

// END RUST SOURCE
// START rustc.main.nll.0.mir
// | '_#2r | U0 | {bb2[0..=5], bb3[0..=1]}
// | '_#3r | U0 | {bb2[1..=5], bb3[0..=1]}
// | '_#4r | U0 | {bb2[4..=5], bb3[0..=1]}
// | '_#2r | U0 | {bb2[0..=8], bb3[0], bb6[0..=1]}
// | '_#3r | U0 | {bb2[1..=8], bb3[0], bb6[0..=1]}
// | '_#4r | U0 | {bb2[4..=8], bb3[0], bb6[0..=1]}
// END rustc.main.nll.0.mir
// START rustc.main.nll.0.mir
// let _2: &'_#3r usize;
Expand Down
12 changes: 7 additions & 5 deletions src/test/mir-opt/simplify_if.rs
Expand Up @@ -5,13 +5,15 @@ fn main() {
}

// END RUST SOURCE
// START rustc.main.SimplifyBranches-initial.before.mir
// START rustc.main.SimplifyBranches-after-copy-prop.before.mir
// bb0: {
// switchInt(const false) -> [false: bb3, otherwise: bb2];
// ...
// switchInt(const false) -> [false: bb3, otherwise: bb1];
// }
// END rustc.main.SimplifyBranches-initial.before.mir
// START rustc.main.SimplifyBranches-initial.after.mir
// END rustc.main.SimplifyBranches-after-copy-prop.before.mir
// START rustc.main.SimplifyBranches-after-copy-prop.after.mir
// bb0: {
// ...
// goto -> bb3;
// }
// END rustc.main.SimplifyBranches-initial.after.mir
// END rustc.main.SimplifyBranches-after-copy-prop.after.mir

0 comments on commit 9903968

Please sign in to comment.