Adjust mir-opt tests for new HIR without If
This commit is contained in:
parent
5cccda1770
commit
99039689f0
4 changed files with 26 additions and 21 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue