Update mir-opt tests to reflect change to EndRegion emission order.

Driveby fix to end_region_9.rs; it was missing END marker and was
therefore always passing (regardless of output correctness).
This commit is contained in:
Felix S. Klock II 2017-08-28 11:40:37 +02:00
parent 25aa86da17
commit ab46142bd9
11 changed files with 20 additions and 19 deletions

View File

@ -30,8 +30,8 @@ fn main() {
// StorageLive(_2); // StorageLive(_2);
// _2 = &'10_1rs _1; // _2 = &'10_1rs _1;
// _0 = (); // _0 = ();
// StorageDead(_2);
// EndRegion('10_1rs); // EndRegion('10_1rs);
// StorageDead(_2);
// StorageDead(_1); // StorageDead(_1);
// return; // return;
// } // }

View File

@ -46,8 +46,8 @@ fn main() {
// bb2: { // bb2: {
// _0 = (); // _0 = ();
// StorageDead(_5); // StorageDead(_5);
// StorageDead(_3);
// EndRegion('23_1rs); // EndRegion('23_1rs);
// StorageDead(_3);
// StorageDead(_2); // StorageDead(_2);
// return; // return;
// } // }
@ -56,10 +56,10 @@ fn main() {
// StorageLive(_7); // StorageLive(_7);
// _7 = &'23_3rs _2; // _7 = &'23_3rs _2;
// _1 = (); // _1 = ();
// StorageDead(_7);
// EndRegion('23_3rs); // EndRegion('23_3rs);
// StorageDead(_3); // StorageDead(_7);
// EndRegion('23_1rs); // EndRegion('23_1rs);
// StorageDead(_3);
// StorageDead(_2); // StorageDead(_2);
// goto -> bb1; // goto -> bb1;
// } // }

View File

@ -49,8 +49,8 @@ fn main() {
// bb2: { // bb2: {
// _0 = (); // _0 = ();
// StorageDead(_5); // StorageDead(_5);
// StorageDead(_3);
// EndRegion('26_1rs); // EndRegion('26_1rs);
// StorageDead(_3);
// StorageDead(_1); // StorageDead(_1);
// return; // return;
// } // }
@ -60,10 +60,10 @@ fn main() {
// StorageLive(_7); // StorageLive(_7);
// _7 = &'26_3rs _1; // _7 = &'26_3rs _1;
// _2 = (); // _2 = ();
// StorageDead(_7);
// EndRegion('26_3rs); // EndRegion('26_3rs);
// StorageDead(_3); // StorageDead(_7);
// EndRegion('26_1rs); // EndRegion('26_1rs);
// StorageDead(_3);
// goto -> bb1; // goto -> bb1;
// } // }
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir // END rustc.node4.SimplifyCfg-qualify-consts.after.mir

View File

@ -53,10 +53,10 @@ fn foo(i: i32) {
// StorageLive(_6); // StorageLive(_6);
// _6 = &'26_4rs _2; // _6 = &'26_4rs _2;
// _0 = (); // _0 = ();
// StorageDead(_6);
// EndRegion('26_4rs); // EndRegion('26_4rs);
// StorageDead(_3); // StorageDead(_6);
// EndRegion('26_2rs); // EndRegion('26_2rs);
// StorageDead(_3);
// StorageDead(_2); // StorageDead(_2);
// drop(_1) -> bb4; // drop(_1) -> bb4;
// } // }

View File

@ -44,8 +44,8 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// _2 = const foo(_3) -> [return: bb1, unwind: bb3]; // _2 = const foo(_3) -> [return: bb1, unwind: bb3];
// } // }
// bb1: { // bb1: {
// StorageDead(_3);
// EndRegion('14s); // EndRegion('14s);
// StorageDead(_3);
// _0 = (); // _0 = ();
// drop(_1) -> bb4; // drop(_1) -> bb4;
// } // }

View File

@ -44,8 +44,8 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// _2 = const foo(_3) -> [return: bb1, unwind: bb3]; // _2 = const foo(_3) -> [return: bb1, unwind: bb3];
// } // }
// bb1: { // bb1: {
// StorageDead(_3);
// EndRegion('19s); // EndRegion('19s);
// StorageDead(_3);
// _0 = (); // _0 = ();
// drop(_1) -> bb4; // drop(_1) -> bb4;
// } // }
@ -75,8 +75,8 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// _3 = ((*_2).0: i32); // _3 = ((*_2).0: i32);
// _0 = _3; // _0 = _3;
// StorageDead(_3); // StorageDead(_3);
// StorageDead(_2);
// EndRegion('15_0rs); // EndRegion('15_0rs);
// StorageDead(_2);
// return; // return;
// } // }
// END rustc.node22.SimplifyCfg-qualify-consts.after.mir // END rustc.node22.SimplifyCfg-qualify-consts.after.mir

View File

@ -84,8 +84,8 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// _3 = ((*_2).0: i32); // _3 = ((*_2).0: i32);
// _0 = _3; // _0 = _3;
// StorageDead(_3); // StorageDead(_3);
// StorageDead(_2);
// EndRegion('15_0rs); // EndRegion('15_0rs);
// StorageDead(_2);
// drop(_1) -> bb1; // drop(_1) -> bb1;
// } // }
// bb1: { // bb1: {

View File

@ -50,8 +50,8 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// bb1: { // bb1: {
// StorageDead(_4); // StorageDead(_4);
// _0 = (); // _0 = ();
// StorageDead(_2);
// EndRegion('21_1rs); // EndRegion('21_1rs);
// StorageDead(_2);
// drop(_1) -> bb4; // drop(_1) -> bb4;
// } // }
// bb2: { // bb2: {

View File

@ -42,7 +42,7 @@ fn main() {
// let mut _0: (); // let mut _0: ();
// let mut _1: bool; // let mut _1: bool;
// let _2: i32; // let _2: i32;
// let mut _4: &'13_0rs i32; // let mut _4: &'33_0rs i32;
// let mut _3: (); // let mut _3: ();
// let mut _5: !; // let mut _5: !;
// let mut _6: (); // let mut _6: ();
@ -67,15 +67,15 @@ fn main() {
// bb2: { // bb2: {
// _0 = (); // _0 = ();
// StorageDead(_7); // StorageDead(_7);
// EndRegion('33_0rs);
// StorageDead(_4); // StorageDead(_4);
// EndRegion('13_0rs);
// StorageDead(_2); // StorageDead(_2);
// StorageDead(_1); // StorageDead(_1);
// return; // return;
// } // }
// //
// bb3: { // bb3: {
// _4 = &'13_0rs _2; // _4 = &'33_0rs _2;
// _6 = (); // _6 = ();
// StorageDead(_7); // StorageDead(_7);
// _1 = const true; // _1 = const true;
@ -83,3 +83,4 @@ fn main() {
// goto -> bb1; // goto -> bb1;
// } // }
// } // }
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir

View File

@ -68,8 +68,8 @@ fn main() {
// _5 = (*_4); // _5 = (*_4);
// _0 = _5; // _0 = _5;
// StorageDead(_5); // StorageDead(_5);
// StorageDead(_4);
// EndRegion(ReScope(Remainder(BlockRemainder { block: ItemLocalId(22), first_statement_index: 0 }))); // EndRegion(ReScope(Remainder(BlockRemainder { block: ItemLocalId(22), first_statement_index: 0 })));
// StorageDead(_4);
// StorageDead(_3); // StorageDead(_3);
// return; // return;
// } // }

View File

@ -54,8 +54,8 @@ fn main() {
// _5 = &ReErased mut (*_3); // _5 = &ReErased mut (*_3);
// Validate(Acquire, [(*_5): i32/ReScope(Node(ItemLocalId(9)))]); // Validate(Acquire, [(*_5): i32/ReScope(Node(ItemLocalId(9)))]);
// _4 = _5 as *mut i32 (Misc); // _4 = _5 as *mut i32 (Misc);
// StorageDead(_5);
// EndRegion(ReScope(Node(ItemLocalId(9)))); // EndRegion(ReScope(Node(ItemLocalId(9))));
// StorageDead(_5);
// Validate(Release, [_0: bool, _4: *mut i32]); // Validate(Release, [_0: bool, _4: *mut i32]);
// _0 = const write_42(_4) -> bb1; // _0 = const write_42(_4) -> bb1;
// } // }