rust/tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

273 lines
6.2 KiB
Diff
Raw Normal View History

- // MIR for `complicated_match` after SimplifyCfg-initial
+ // MIR for `complicated_match` after ElaborateDrops
fn complicated_match(_1: bool, _2: (bool, bool, String)) -> i32 {
2023-06-06 13:47:00 +00:00
debug cond => _1;
debug items => _2;
let mut _0: i32;
let mut _3: &bool;
let mut _4: &bool;
let _5: bool;
let _6: &bool;
let _7: std::string::String;
let _8: &std::string::String;
let mut _9: bool;
let mut _10: bool;
let mut _11: !;
let mut _12: bool;
let mut _13: bool;
let mut _14: !;
let _15: bool;
let _16: std::string::String;
scope 1 {
2023-06-06 13:47:00 +00:00
debug a => _5;
debug a => _6;
debug s => _7;
debug s => _8;
}
scope 2 {
2023-06-06 13:47:00 +00:00
debug b => _15;
debug t => _16;
}
bb0: {
2023-06-06 13:47:00 +00:00
- FakeRead(ForMatchedPlace(None), _2);
- switchInt((_2.0: bool)) -> [0: bb1, otherwise: bb2];
+ switchInt((_2.0: bool)) -> [0: bb5, otherwise: bb1];
}
2020-10-02 20:11:24 +00:00
bb1: {
2023-06-06 13:47:00 +00:00
- falseEdge -> [real: bb8, imaginary: bb3];
+ switchInt((_2.1: bool)) -> [0: bb10, otherwise: bb2];
}
bb2: {
2023-06-06 13:47:00 +00:00
- switchInt((_2.1: bool)) -> [0: bb3, otherwise: bb4];
+ switchInt((_2.0: bool)) -> [0: bb3, otherwise: bb17];
}
bb3: {
2023-06-06 13:47:00 +00:00
- falseEdge -> [real: bb13, imaginary: bb5];
- }
-
2020-10-02 20:11:24 +00:00
- bb4: {
2023-06-06 13:47:00 +00:00
- switchInt((_2.0: bool)) -> [0: bb6, otherwise: bb5];
- }
-
2020-10-02 20:11:24 +00:00
- bb5: {
2023-06-06 13:47:00 +00:00
- falseEdge -> [real: bb20, imaginary: bb6];
- }
-
2020-10-02 20:11:24 +00:00
- bb6: {
2023-06-06 13:47:00 +00:00
StorageLive(_15);
_15 = (_2.1: bool);
StorageLive(_16);
_16 = move (_2.2: std::string::String);
- goto -> bb19;
+ goto -> bb16;
}
2020-10-02 20:11:24 +00:00
- bb7: {
+ bb4: {
2023-06-06 13:47:00 +00:00
_0 = const 1_i32;
- drop(_7) -> [return: bb18, unwind: bb25];
+ drop(_7) -> [return: bb15, unwind: bb22];
}
2020-10-02 20:11:24 +00:00
- bb8: {
+ bb5: {
2023-06-06 13:47:00 +00:00
StorageLive(_6);
_6 = &(_2.1: bool);
StorageLive(_8);
_8 = &(_2.2: std::string::String);
- _3 = &shallow (_2.0: bool);
- _4 = &shallow (_2.1: bool);
StorageLive(_9);
StorageLive(_10);
_10 = _1;
- switchInt(move _10) -> [0: bb10, otherwise: bb9];
+ switchInt(move _10) -> [0: bb7, otherwise: bb6];
}
2020-10-02 20:11:24 +00:00
- bb9: {
+ bb6: {
2023-06-06 13:47:00 +00:00
_0 = const 3_i32;
StorageDead(_10);
StorageDead(_9);
- goto -> bb23;
+ goto -> bb20;
}
2021-01-01 18:38:11 +00:00
- bb10: {
2020-10-02 20:11:24 +00:00
+ bb7: {
2023-06-06 13:47:00 +00:00
_9 = (*_6);
- switchInt(move _9) -> [0: bb12, otherwise: bb11];
+ switchInt(move _9) -> [0: bb9, otherwise: bb8];
}
2021-01-01 18:38:11 +00:00
- bb11: {
2020-10-02 20:11:24 +00:00
+ bb8: {
2023-06-06 13:47:00 +00:00
StorageDead(_10);
StorageDead(_9);
- FakeRead(ForMatchGuard, _3);
- FakeRead(ForMatchGuard, _4);
- FakeRead(ForGuardBinding, _6);
- FakeRead(ForGuardBinding, _8);
StorageLive(_5);
_5 = (_2.1: bool);
StorageLive(_7);
_7 = move (_2.2: std::string::String);
- goto -> bb7;
+ goto -> bb4;
}
2021-01-01 18:38:11 +00:00
- bb12: {
2020-10-02 20:11:24 +00:00
+ bb9: {
2023-06-06 13:47:00 +00:00
StorageDead(_10);
StorageDead(_9);
StorageDead(_8);
StorageDead(_6);
- falseEdge -> [real: bb2, imaginary: bb3];
+ goto -> bb1;
}
2021-01-01 18:38:11 +00:00
- bb13: {
2020-10-02 20:11:24 +00:00
+ bb10: {
2023-06-06 13:47:00 +00:00
StorageLive(_6);
_6 = &(_2.0: bool);
StorageLive(_8);
_8 = &(_2.2: std::string::String);
- _3 = &shallow (_2.0: bool);
- _4 = &shallow (_2.1: bool);
StorageLive(_12);
StorageLive(_13);
_13 = _1;
- switchInt(move _13) -> [0: bb15, otherwise: bb14];
+ switchInt(move _13) -> [0: bb12, otherwise: bb11];
}
2021-01-01 18:38:11 +00:00
- bb14: {
2020-10-02 20:11:24 +00:00
+ bb11: {
2023-06-06 13:47:00 +00:00
_0 = const 3_i32;
StorageDead(_13);
StorageDead(_12);
- goto -> bb23;
+ goto -> bb20;
}
2021-01-01 18:38:11 +00:00
- bb15: {
2020-10-02 20:11:24 +00:00
+ bb12: {
2023-06-06 13:47:00 +00:00
_12 = (*_6);
- switchInt(move _12) -> [0: bb17, otherwise: bb16];
+ switchInt(move _12) -> [0: bb14, otherwise: bb13];
}
2021-01-01 18:38:11 +00:00
- bb16: {
2020-10-02 20:11:24 +00:00
+ bb13: {
2023-06-06 13:47:00 +00:00
StorageDead(_13);
StorageDead(_12);
- FakeRead(ForMatchGuard, _3);
- FakeRead(ForMatchGuard, _4);
- FakeRead(ForGuardBinding, _6);
- FakeRead(ForGuardBinding, _8);
StorageLive(_5);
_5 = (_2.0: bool);
StorageLive(_7);
_7 = move (_2.2: std::string::String);
- goto -> bb7;
+ goto -> bb4;
}
2021-01-01 18:38:11 +00:00
- bb17: {
2020-10-02 20:11:24 +00:00
+ bb14: {
2023-06-06 13:47:00 +00:00
StorageDead(_13);
StorageDead(_12);
StorageDead(_8);
StorageDead(_6);
- falseEdge -> [real: bb4, imaginary: bb5];
+ goto -> bb2;
}
2021-01-01 18:38:11 +00:00
- bb18: {
2020-10-02 20:11:24 +00:00
+ bb15: {
2023-06-06 13:47:00 +00:00
StorageDead(_7);
StorageDead(_5);
StorageDead(_8);
StorageDead(_6);
- goto -> bb22;
+ goto -> bb19;
}
2021-01-01 18:38:11 +00:00
- bb19: {
2020-10-02 20:11:24 +00:00
+ bb16: {
2023-06-06 13:47:00 +00:00
_0 = const 2_i32;
- drop(_16) -> [return: bb21, unwind: bb25];
+ drop(_16) -> [return: bb18, unwind: bb22];
}
2021-01-01 18:38:11 +00:00
- bb20: {
2020-10-02 20:11:24 +00:00
+ bb17: {
2023-06-06 13:47:00 +00:00
StorageLive(_15);
_15 = (_2.1: bool);
StorageLive(_16);
_16 = move (_2.2: std::string::String);
- goto -> bb19;
+ goto -> bb16;
}
2021-01-01 18:38:11 +00:00
- bb21: {
2020-10-02 20:11:24 +00:00
+ bb18: {
2023-06-06 13:47:00 +00:00
StorageDead(_16);
StorageDead(_15);
- goto -> bb22;
+ goto -> bb19;
}
2021-01-01 18:38:11 +00:00
- bb22: {
2023-06-06 13:47:00 +00:00
- drop(_2) -> [return: bb24, unwind: bb26];
2020-10-02 20:11:24 +00:00
+ bb19: {
2023-06-06 13:47:00 +00:00
+ goto -> bb26;
2020-10-02 20:11:24 +00:00
}
2021-01-01 18:38:11 +00:00
- bb23: {
2020-10-02 20:11:24 +00:00
+ bb20: {
2023-06-06 13:47:00 +00:00
StorageDead(_8);
StorageDead(_6);
- drop(_2) -> [return: bb24, unwind: bb26];
+ drop(_2) -> [return: bb21, unwind: bb23];
2020-10-02 20:11:24 +00:00
}
2021-01-01 18:38:11 +00:00
- bb24: {
2020-10-02 20:11:24 +00:00
+ bb21: {
2023-06-06 13:47:00 +00:00
return;
2020-10-02 20:11:24 +00:00
}
2021-01-01 18:38:11 +00:00
- bb25 (cleanup): {
2023-06-06 13:47:00 +00:00
- drop(_2) -> [return: bb26, unwind terminate];
2020-10-02 20:11:24 +00:00
+ bb22 (cleanup): {
2023-06-06 13:47:00 +00:00
+ goto -> bb27;
2020-10-02 20:11:24 +00:00
}
2021-01-01 18:38:11 +00:00
- bb26 (cleanup): {
2020-10-02 20:11:24 +00:00
+ bb23 (cleanup): {
2023-06-06 13:47:00 +00:00
resume;
+ }
+
2020-10-02 20:11:24 +00:00
+ bb24: {
2023-06-06 13:47:00 +00:00
+ goto -> bb21;
+ }
+
+ bb25 (cleanup): {
2023-06-06 13:47:00 +00:00
+ goto -> bb23;
+ }
+
+ bb26: {
2023-06-06 13:47:00 +00:00
+ goto -> bb24;
+ }
+
+ bb27 (cleanup): {
2023-06-06 13:47:00 +00:00
+ goto -> bb23;
}
}