1
Fork 0

Update mir-opt test to reflect change to MIR code-generation.

This commit is contained in:
Felix S. Klock II 2018-05-04 13:17:13 +02:00
parent 28d18fabe3
commit 930e76e2af

View file

@ -54,17 +54,17 @@ fn main() {
// ... // ...
// _2 = std::option::Option<i32>::Some(const 42i32,); // _2 = std::option::Option<i32>::Some(const 42i32,);
// _3 = discriminant(_2); // _3 = discriminant(_2);
// _6 = discriminant(_2); // _7 = discriminant(_2);
// switchInt(move _6) -> [0isize: bb6, 1isize: bb4, otherwise: bb8]; // switchInt(move _7) -> [0isize: bb6, 1isize: bb4, otherwise: bb8];
// } // }
// bb1: { // bb1: {
// resume; // resume;
// } // }
// bb2: { // arm1 // bb2: { // arm1
// StorageLive(_8); // StorageLive(_9);
// _8 = _4; // _9 = _4;
// _1 = (const 1i32, move _8); // _1 = (const 1i32, move _9);
// StorageDead(_8); // StorageDead(_9);
// goto -> bb13; // goto -> bb13;
// } // }
// bb3: { // binding3(empty) and arm3 // bb3: { // binding3(empty) and arm3
@ -87,24 +87,26 @@ fn main() {
// unreachable; // unreachable;
// } // }
// bb9: { // binding1 and guard // bb9: { // binding1 and guard
// StorageLive(_4); // StorageLive(_5);
// _4 = ((_2 as Some).0: i32); // _5 = &((_2 as Some).0: i32);
// StorageLive(_7); // StorageLive(_8);
// _7 = const guard() -> [return: bb10, unwind: bb1]; // _8 = const guard() -> [return: bb10, unwind: bb1];
// } // }
// bb10: { // end of guard // bb10: { // end of guard
// switchInt(move _7) -> [false: bb11, otherwise: bb2]; // StorageLive(_4);
// _4 = ((_2 as Some).0: i32);
// switchInt(move _8) -> [false: bb11, otherwise: bb2];
// } // }
// bb11: { // to pre_binding2 // bb11: { // to pre_binding2
// falseEdges -> [real: bb5, imaginary: bb5]; // falseEdges -> [real: bb5, imaginary: bb5];
// } // }
// bb12: { // bindingNoLandingPads.before.mir2 and arm2 // bb12: { // bindingNoLandingPads.before.mir2 and arm2
// StorageLive(_5); // StorageLive(_6);
// _5 = ((_2 as Some).0: i32); // _6 = ((_2 as Some).0: i32);
// StorageLive(_9); // StorageLive(_10);
// _9 = _5; // _10 = _6;
// _1 = (const 2i32, move _9); // _1 = (const 2i32, move _10);
// StorageDead(_9); // StorageDead(_10);
// goto -> bb13; // goto -> bb13;
// } // }
// bb13: { // bb13: {
@ -118,17 +120,17 @@ fn main() {
// ... // ...
// _2 = std::option::Option<i32>::Some(const 42i32,); // _2 = std::option::Option<i32>::Some(const 42i32,);
// _3 = discriminant(_2); // _3 = discriminant(_2);
// _6 = discriminant(_2); // _7 = discriminant(_2);
// switchInt(move _6) -> [0isize: bb5, 1isize: bb4, otherwise: bb8]; // switchInt(move _7) -> [0isize: bb5, 1isize: bb4, otherwise: bb8];
// } // }
// bb1: { // bb1: {
// resume; // resume;
// } // }
// bb2: { // arm1 // bb2: { // arm1
// StorageLive(_8); // StorageLive(_9);
// _8 = _4; // _9 = _4;
// _1 = (const 1i32, move _8); // _1 = (const 1i32, move _9);
// StorageDead(_8); // StorageDead(_9);
// goto -> bb13; // goto -> bb13;
// } // }
// bb3: { // binding3(empty) and arm3 // bb3: { // binding3(empty) and arm3
@ -151,24 +153,26 @@ fn main() {
// unreachable; // unreachable;
// } // }
// bb9: { // binding1 and guard // bb9: { // binding1 and guard
// StorageLive(_4); // StorageLive(_5);
// _4 = ((_2 as Some).0: i32); // _5 = &((_2 as Some).0: i32);
// StorageLive(_7); // StorageLive(_8);
// _7 = const guard() -> [return: bb10, unwind: bb1]; // _8 = const guard() -> [return: bb10, unwind: bb1];
// } // }
// bb10: { // end of guard // bb10: { // end of guard
// switchInt(move _7) -> [false: bb11, otherwise: bb2]; // StorageLive(_4);
// _4 = ((_2 as Some).0: i32);
// switchInt(move _8) -> [false: bb11, otherwise: bb2];
// } // }
// bb11: { // to pre_binding2 // bb11: { // to pre_binding2
// falseEdges -> [real: bb6, imaginary: bb5]; // falseEdges -> [real: bb6, imaginary: bb5];
// } // }
// bb12: { // binding2 and arm2 // bb12: { // binding2 and arm2
// StorageLive(_5); // StorageLive(_6);
// _5 = ((_2 as Some).0: i32); // _6 = ((_2 as Some).0: i32);
// StorageLive(_9); // StorageLive(_10);
// _9 = _5; // _10 = _6;
// _1 = (const 2i32, move _9); // _1 = (const 2i32, move _10);
// StorageDead(_9); // StorageDead(_10);
// goto -> bb13; // goto -> bb13;
// } // }
// bb13: { // bb13: {
@ -182,8 +186,8 @@ fn main() {
// ... // ...
// _2 = std::option::Option<i32>::Some(const 1i32,); // _2 = std::option::Option<i32>::Some(const 1i32,);
// _3 = discriminant(_2); // _3 = discriminant(_2);
// _8 = discriminant(_2); // _10 = discriminant(_2);
// switchInt(move _8) -> [1isize: bb4, otherwise: bb5]; // switchInt(move _10) -> [1isize: bb4, otherwise: bb5];
// } // }
// bb1: { // bb1: {
// resume; // resume;
@ -213,41 +217,45 @@ fn main() {
// unreachable; // unreachable;
// } // }
// bb9: { // binding1: Some(w) if guard() // bb9: { // binding1: Some(w) if guard()
// StorageLive(_4); // StorageLive(_5);
// _4 = ((_2 as Some).0: i32); // _5 = &((_2 as Some).0: i32);
// StorageLive(_9); // StorageLive(_11);
// _9 = const guard() -> [return: bb10, unwind: bb1]; // _11 = const guard() -> [return: bb10, unwind: bb1];
// } // }
// bb10: { //end of guard // bb10: { //end of guard
// switchInt(move _9) -> [false: bb11, otherwise: bb2]; // StorageLive(_4);
// _4 = ((_2 as Some).0: i32);
// switchInt(move _11) -> [false: bb11, otherwise: bb2];
// } // }
// bb11: { // to pre_binding2 // bb11: { // to pre_binding2
// falseEdges -> [real: bb5, imaginary: bb5]; // falseEdges -> [real: bb5, imaginary: bb5];
// } // }
// bb12: { // binding2 & arm2 // bb12: { // binding2 & arm2
// StorageLive(_5); // StorageLive(_6);
// _5 = _2; // _6 = _2;
// _1 = const 2i32; // _1 = const 2i32;
// goto -> bb17; // goto -> bb17;
// } // }
// bb13: { // binding3: Some(y) if guard2(y) // bb13: { // binding3: Some(y) if guard2(y)
// StorageLive(_6); // StorageLive(_8);
// _6 = ((_2 as Some).0: i32); // _8 = &((_2 as Some).0: i32);
// StorageLive(_11); // StorageLive(_13);
// StorageLive(_12); // StorageLive(_14);
// _12 = _6; // _14 = (*_8);
// _11 = const guard2(move _12) -> [return: bb14, unwind: bb1]; // _13 = const guard2(move _14) -> [return: bb14, unwind: bb1];
// } // }
// bb14: { // end of guard2 // bb14: { // end of guard2
// StorageDead(_12); // StorageDead(_14);
// switchInt(move _11) -> [false: bb15, otherwise: bb3]; // StorageLive(_7);
// _7 = ((_2 as Some).0: i32);
// switchInt(move _13) -> [false: bb15, otherwise: bb3];
// } // }
// bb15: { // to pre_binding4 // bb15: { // to pre_binding4
// falseEdges -> [real: bb7, imaginary: bb7]; // falseEdges -> [real: bb7, imaginary: bb7];
// } // }
// bb16: { // binding4 & arm4 // bb16: { // binding4 & arm4
// StorageLive(_7); // StorageLive(_9);
// _7 = _2; // _9 = _2;
// _1 = const 4i32; // _1 = const 4i32;
// goto -> bb17; // goto -> bb17;
// } // }