Skip to content

Commit

Permalink
Update mir-opt test to reflect change to MIR code-generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed May 4, 2018
1 parent 28d18fa commit 930e76e
Showing 1 changed file with 61 additions and 53 deletions.
114 changes: 61 additions & 53 deletions src/test/mir-opt/match_false_edges.rs
Expand Up @@ -54,17 +54,17 @@ fn main() {
// ...
// _2 = std::option::Option<i32>::Some(const 42i32,);
// _3 = discriminant(_2);
// _6 = discriminant(_2);
// switchInt(move _6) -> [0isize: bb6, 1isize: bb4, otherwise: bb8];
// _7 = discriminant(_2);
// switchInt(move _7) -> [0isize: bb6, 1isize: bb4, otherwise: bb8];
// }
// bb1: {
// resume;
// }
// bb2: { // arm1
// StorageLive(_8);
// _8 = _4;
// _1 = (const 1i32, move _8);
// StorageDead(_8);
// StorageLive(_9);
// _9 = _4;
// _1 = (const 1i32, move _9);
// StorageDead(_9);
// goto -> bb13;
// }
// bb3: { // binding3(empty) and arm3
Expand All @@ -87,24 +87,26 @@ fn main() {
// unreachable;
// }
// bb9: { // binding1 and guard
// StorageLive(_4);
// _4 = ((_2 as Some).0: i32);
// StorageLive(_7);
// _7 = const guard() -> [return: bb10, unwind: bb1];
// StorageLive(_5);
// _5 = &((_2 as Some).0: i32);
// StorageLive(_8);
// _8 = const guard() -> [return: bb10, unwind: bb1];
// }
// 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
// falseEdges -> [real: bb5, imaginary: bb5];
// }
// bb12: { // bindingNoLandingPads.before.mir2 and arm2
// StorageLive(_5);
// _5 = ((_2 as Some).0: i32);
// StorageLive(_9);
// _9 = _5;
// _1 = (const 2i32, move _9);
// StorageDead(_9);
// StorageLive(_6);
// _6 = ((_2 as Some).0: i32);
// StorageLive(_10);
// _10 = _6;
// _1 = (const 2i32, move _10);
// StorageDead(_10);
// goto -> bb13;
// }
// bb13: {
Expand All @@ -118,17 +120,17 @@ fn main() {
// ...
// _2 = std::option::Option<i32>::Some(const 42i32,);
// _3 = discriminant(_2);
// _6 = discriminant(_2);
// switchInt(move _6) -> [0isize: bb5, 1isize: bb4, otherwise: bb8];
// _7 = discriminant(_2);
// switchInt(move _7) -> [0isize: bb5, 1isize: bb4, otherwise: bb8];
// }
// bb1: {
// resume;
// }
// bb2: { // arm1
// StorageLive(_8);
// _8 = _4;
// _1 = (const 1i32, move _8);
// StorageDead(_8);
// StorageLive(_9);
// _9 = _4;
// _1 = (const 1i32, move _9);
// StorageDead(_9);
// goto -> bb13;
// }
// bb3: { // binding3(empty) and arm3
Expand All @@ -151,24 +153,26 @@ fn main() {
// unreachable;
// }
// bb9: { // binding1 and guard
// StorageLive(_4);
// _4 = ((_2 as Some).0: i32);
// StorageLive(_7);
// _7 = const guard() -> [return: bb10, unwind: bb1];
// StorageLive(_5);
// _5 = &((_2 as Some).0: i32);
// StorageLive(_8);
// _8 = const guard() -> [return: bb10, unwind: bb1];
// }
// 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
// falseEdges -> [real: bb6, imaginary: bb5];
// }
// bb12: { // binding2 and arm2
// StorageLive(_5);
// _5 = ((_2 as Some).0: i32);
// StorageLive(_9);
// _9 = _5;
// _1 = (const 2i32, move _9);
// StorageDead(_9);
// StorageLive(_6);
// _6 = ((_2 as Some).0: i32);
// StorageLive(_10);
// _10 = _6;
// _1 = (const 2i32, move _10);
// StorageDead(_10);
// goto -> bb13;
// }
// bb13: {
Expand All @@ -182,8 +186,8 @@ fn main() {
// ...
// _2 = std::option::Option<i32>::Some(const 1i32,);
// _3 = discriminant(_2);
// _8 = discriminant(_2);
// switchInt(move _8) -> [1isize: bb4, otherwise: bb5];
// _10 = discriminant(_2);
// switchInt(move _10) -> [1isize: bb4, otherwise: bb5];
// }
// bb1: {
// resume;
Expand Down Expand Up @@ -213,41 +217,45 @@ fn main() {
// unreachable;
// }
// bb9: { // binding1: Some(w) if guard()
// StorageLive(_4);
// _4 = ((_2 as Some).0: i32);
// StorageLive(_9);
// _9 = const guard() -> [return: bb10, unwind: bb1];
// StorageLive(_5);
// _5 = &((_2 as Some).0: i32);
// StorageLive(_11);
// _11 = const guard() -> [return: bb10, unwind: bb1];
// }
// 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
// falseEdges -> [real: bb5, imaginary: bb5];
// }
// bb12: { // binding2 & arm2
// StorageLive(_5);
// _5 = _2;
// StorageLive(_6);
// _6 = _2;
// _1 = const 2i32;
// goto -> bb17;
// }
// bb13: { // binding3: Some(y) if guard2(y)
// StorageLive(_6);
// _6 = ((_2 as Some).0: i32);
// StorageLive(_11);
// StorageLive(_12);
// _12 = _6;
// _11 = const guard2(move _12) -> [return: bb14, unwind: bb1];
// StorageLive(_8);
// _8 = &((_2 as Some).0: i32);
// StorageLive(_13);
// StorageLive(_14);
// _14 = (*_8);
// _13 = const guard2(move _14) -> [return: bb14, unwind: bb1];
// }
// bb14: { // end of guard2
// StorageDead(_12);
// switchInt(move _11) -> [false: bb15, otherwise: bb3];
// StorageDead(_14);
// StorageLive(_7);
// _7 = ((_2 as Some).0: i32);
// switchInt(move _13) -> [false: bb15, otherwise: bb3];
// }
// bb15: { // to pre_binding4
// falseEdges -> [real: bb7, imaginary: bb7];
// }
// bb16: { // binding4 & arm4
// StorageLive(_7);
// _7 = _2;
// StorageLive(_9);
// _9 = _2;
// _1 = const 4i32;
// goto -> bb17;
// }
Expand Down

0 comments on commit 930e76e

Please sign in to comment.