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

273 lines
16 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 {
2022-11-02 16:54:49 -05:00
debug cond => _1; // in scope 0 at $DIR/match_arm_scopes.rs:+0:22: +0:26
debug items => _2; // in scope 0 at $DIR/match_arm_scopes.rs:+0:34: +0:39
let mut _0: i32; // return place in scope 0 at $DIR/match_arm_scopes.rs:+0:66: +0:69
let mut _3: &bool; // in scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
let mut _4: &bool; // in scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
let _5: bool; // in scope 0 at $DIR/match_arm_scopes.rs:+2:17: +2:18
let _6: &bool; // in scope 0 at $DIR/match_arm_scopes.rs:+2:17: +2:18
let _7: std::string::String; // in scope 0 at $DIR/match_arm_scopes.rs:+2:20: +2:21
let _8: &std::string::String; // in scope 0 at $DIR/match_arm_scopes.rs:+2:20: +2:21
let mut _9: bool; // in scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
let mut _10: bool; // in scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
let mut _11: !; // in scope 0 at $DIR/match_arm_scopes.rs:+2:52: +2:60
let mut _12: bool; // in scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
let mut _13: bool; // in scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
let mut _14: !; // in scope 0 at $DIR/match_arm_scopes.rs:+2:52: +2:60
let _15: bool; // in scope 0 at $DIR/match_arm_scopes.rs:+3:16: +3:17
let _16: std::string::String; // in scope 0 at $DIR/match_arm_scopes.rs:+3:19: +3:20
scope 1 {
2022-11-02 16:54:49 -05:00
debug a => _5; // in scope 1 at $DIR/match_arm_scopes.rs:+2:17: +2:18
debug a => _6; // in scope 1 at $DIR/match_arm_scopes.rs:+2:17: +2:18
debug s => _7; // in scope 1 at $DIR/match_arm_scopes.rs:+2:20: +2:21
debug s => _8; // in scope 1 at $DIR/match_arm_scopes.rs:+2:20: +2:21
}
scope 2 {
2022-11-02 16:54:49 -05:00
debug b => _15; // in scope 2 at $DIR/match_arm_scopes.rs:+3:16: +3:17
debug t => _16; // in scope 2 at $DIR/match_arm_scopes.rs:+3:19: +3:20
}
bb0: {
2022-11-02 16:54:49 -05:00
- FakeRead(ForMatchedPlace(None), _2); // scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
- switchInt((_2.0: bool)) -> [0: bb1, otherwise: bb2]; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +1:16
+ switchInt((_2.0: bool)) -> [0: bb5, otherwise: bb1]; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +1:16
}
2020-10-02 15:11:24 -05:00
bb1: {
2022-11-02 16:54:49 -05:00
- falseEdge -> [real: bb8, imaginary: bb3]; // scope 0 at $DIR/match_arm_scopes.rs:+2:9: +2:22
+ switchInt((_2.1: bool)) -> [0: bb10, otherwise: bb2]; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +1:16
}
bb2: {
- switchInt((_2.1: bool)) -> [0: bb3, otherwise: bb4]; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +1:16
+ switchInt((_2.0: bool)) -> [0: bb3, otherwise: bb17]; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +1:16
}
bb3: {
2022-11-02 16:54:49 -05:00
- falseEdge -> [real: bb13, imaginary: bb5]; // scope 0 at $DIR/match_arm_scopes.rs:+2:25: +2:38
- }
-
2020-10-02 15:11:24 -05:00
- bb4: {
- switchInt((_2.0: bool)) -> [0: bb6, otherwise: bb5]; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +1:16
- }
-
2020-10-02 15:11:24 -05:00
- bb5: {
2022-11-02 16:54:49 -05:00
- falseEdge -> [real: bb20, imaginary: bb6]; // scope 0 at $DIR/match_arm_scopes.rs:+3:9: +3:21
- }
-
2020-10-02 15:11:24 -05:00
- bb6: {
2022-11-02 16:54:49 -05:00
StorageLive(_15); // scope 0 at $DIR/match_arm_scopes.rs:+3:32: +3:33
_15 = (_2.1: bool); // scope 0 at $DIR/match_arm_scopes.rs:+3:32: +3:33
StorageLive(_16); // scope 0 at $DIR/match_arm_scopes.rs:+3:35: +3:36
_16 = move (_2.2: std::string::String); // scope 0 at $DIR/match_arm_scopes.rs:+3:35: +3:36
- goto -> bb19; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
+ goto -> bb16; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
}
2020-10-02 15:11:24 -05:00
- bb7: {
+ bb4: {
2022-11-02 16:54:49 -05:00
_0 = const 1_i32; // scope 1 at $DIR/match_arm_scopes.rs:+2:77: +2:78
- drop(_7) -> [return: bb18, unwind: bb25]; // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
+ drop(_7) -> [return: bb15, unwind: bb22]; // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
}
2020-10-02 15:11:24 -05:00
- bb8: {
+ bb5: {
2022-11-02 16:54:49 -05:00
StorageLive(_6); // scope 0 at $DIR/match_arm_scopes.rs:+2:17: +2:18
_6 = &(_2.1: bool); // scope 0 at $DIR/match_arm_scopes.rs:+2:17: +2:18
StorageLive(_8); // scope 0 at $DIR/match_arm_scopes.rs:+2:20: +2:21
_8 = &(_2.2: std::string::String); // scope 0 at $DIR/match_arm_scopes.rs:+2:20: +2:21
- _3 = &shallow (_2.0: bool); // scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
- _4 = &shallow (_2.1: bool); // scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
StorageLive(_9); // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
StorageLive(_10); // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
_10 = _1; // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
- switchInt(move _10) -> [0: bb10, otherwise: bb9]; // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
+ switchInt(move _10) -> [0: bb7, otherwise: bb6]; // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
}
2020-10-02 15:11:24 -05:00
- bb9: {
+ bb6: {
2022-11-02 16:54:49 -05:00
_0 = const 3_i32; // scope 0 at $DIR/match_arm_scopes.rs:+2:59: +2:60
StorageDead(_10); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
StorageDead(_9); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
2021-06-08 19:00:00 -05:00
- goto -> bb23; // scope 0 at no-location
+ goto -> bb20; // scope 0 at no-location
}
2021-01-01 12:38:11 -06:00
- bb10: {
2020-10-02 15:11:24 -05:00
+ bb7: {
2022-11-02 16:54:49 -05:00
_9 = (*_6); // scope 0 at $DIR/match_arm_scopes.rs:+2:70: +2:71
- switchInt(move _9) -> [0: bb12, otherwise: bb11]; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
+ switchInt(move _9) -> [0: bb9, otherwise: bb8]; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
}
2021-01-01 12:38:11 -06:00
- bb11: {
2020-10-02 15:11:24 -05:00
+ bb8: {
2022-11-02 16:54:49 -05:00
StorageDead(_10); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
StorageDead(_9); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
- FakeRead(ForMatchGuard, _3); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
- FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
- FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
- FakeRead(ForGuardBinding, _8); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
StorageLive(_5); // scope 0 at $DIR/match_arm_scopes.rs:+2:17: +2:18
_5 = (_2.1: bool); // scope 0 at $DIR/match_arm_scopes.rs:+2:17: +2:18
StorageLive(_7); // scope 0 at $DIR/match_arm_scopes.rs:+2:20: +2:21
_7 = move (_2.2: std::string::String); // scope 0 at $DIR/match_arm_scopes.rs:+2:20: +2:21
- goto -> bb7; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
+ goto -> bb4; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
}
2021-01-01 12:38:11 -06:00
- bb12: {
2020-10-02 15:11:24 -05:00
+ bb9: {
2022-11-02 16:54:49 -05:00
StorageDead(_10); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
StorageDead(_9); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
StorageDead(_8); // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
StorageDead(_6); // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
- falseEdge -> [real: bb2, imaginary: bb3]; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
+ goto -> bb1; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
}
2021-01-01 12:38:11 -06:00
- bb13: {
2020-10-02 15:11:24 -05:00
+ bb10: {
2022-11-02 16:54:49 -05:00
StorageLive(_6); // scope 0 at $DIR/match_arm_scopes.rs:+2:26: +2:27
_6 = &(_2.0: bool); // scope 0 at $DIR/match_arm_scopes.rs:+2:26: +2:27
StorageLive(_8); // scope 0 at $DIR/match_arm_scopes.rs:+2:36: +2:37
_8 = &(_2.2: std::string::String); // scope 0 at $DIR/match_arm_scopes.rs:+2:36: +2:37
- _3 = &shallow (_2.0: bool); // scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
- _4 = &shallow (_2.1: bool); // scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
StorageLive(_12); // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
StorageLive(_13); // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
_13 = _1; // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
- switchInt(move _13) -> [0: bb15, otherwise: bb14]; // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
+ switchInt(move _13) -> [0: bb12, otherwise: bb11]; // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
}
2021-01-01 12:38:11 -06:00
- bb14: {
2020-10-02 15:11:24 -05:00
+ bb11: {
2022-11-02 16:54:49 -05:00
_0 = const 3_i32; // scope 0 at $DIR/match_arm_scopes.rs:+2:59: +2:60
StorageDead(_13); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
StorageDead(_12); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
2021-06-08 19:00:00 -05:00
- goto -> bb23; // scope 0 at no-location
+ goto -> bb20; // scope 0 at no-location
}
2021-01-01 12:38:11 -06:00
- bb15: {
2020-10-02 15:11:24 -05:00
+ bb12: {
2022-11-02 16:54:49 -05:00
_12 = (*_6); // scope 0 at $DIR/match_arm_scopes.rs:+2:70: +2:71
- switchInt(move _12) -> [0: bb17, otherwise: bb16]; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
+ switchInt(move _12) -> [0: bb14, otherwise: bb13]; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
}
2021-01-01 12:38:11 -06:00
- bb16: {
2020-10-02 15:11:24 -05:00
+ bb13: {
2022-11-02 16:54:49 -05:00
StorageDead(_13); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
StorageDead(_12); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
- FakeRead(ForMatchGuard, _3); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
- FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
- FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
- FakeRead(ForGuardBinding, _8); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
StorageLive(_5); // scope 0 at $DIR/match_arm_scopes.rs:+2:26: +2:27
_5 = (_2.0: bool); // scope 0 at $DIR/match_arm_scopes.rs:+2:26: +2:27
StorageLive(_7); // scope 0 at $DIR/match_arm_scopes.rs:+2:36: +2:37
_7 = move (_2.2: std::string::String); // scope 0 at $DIR/match_arm_scopes.rs:+2:36: +2:37
- goto -> bb7; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
+ goto -> bb4; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
}
2021-01-01 12:38:11 -06:00
- bb17: {
2020-10-02 15:11:24 -05:00
+ bb14: {
2022-11-02 16:54:49 -05:00
StorageDead(_13); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
StorageDead(_12); // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
StorageDead(_8); // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
StorageDead(_6); // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
- falseEdge -> [real: bb4, imaginary: bb5]; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
+ goto -> bb2; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
}
2021-01-01 12:38:11 -06:00
- bb18: {
2020-10-02 15:11:24 -05:00
+ bb15: {
2022-11-02 16:54:49 -05:00
StorageDead(_7); // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
StorageDead(_5); // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
StorageDead(_8); // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
StorageDead(_6); // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
- goto -> bb22; // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
+ goto -> bb19; // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
}
2021-01-01 12:38:11 -06:00
- bb19: {
2020-10-02 15:11:24 -05:00
+ bb16: {
2022-11-02 16:54:49 -05:00
_0 = const 2_i32; // scope 2 at $DIR/match_arm_scopes.rs:+3:41: +3:42
- drop(_16) -> [return: bb21, unwind: bb25]; // scope 0 at $DIR/match_arm_scopes.rs:+3:41: +3:42
+ drop(_16) -> [return: bb18, unwind: bb22]; // scope 0 at $DIR/match_arm_scopes.rs:+3:41: +3:42
}
2021-01-01 12:38:11 -06:00
- bb20: {
2020-10-02 15:11:24 -05:00
+ bb17: {
2022-11-02 16:54:49 -05:00
StorageLive(_15); // scope 0 at $DIR/match_arm_scopes.rs:+3:16: +3:17
_15 = (_2.1: bool); // scope 0 at $DIR/match_arm_scopes.rs:+3:16: +3:17
StorageLive(_16); // scope 0 at $DIR/match_arm_scopes.rs:+3:19: +3:20
_16 = move (_2.2: std::string::String); // scope 0 at $DIR/match_arm_scopes.rs:+3:19: +3:20
- goto -> bb19; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
+ goto -> bb16; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
}
2021-01-01 12:38:11 -06:00
- bb21: {
2020-10-02 15:11:24 -05:00
+ bb18: {
2022-11-02 16:54:49 -05:00
StorageDead(_16); // scope 0 at $DIR/match_arm_scopes.rs:+3:41: +3:42
StorageDead(_15); // scope 0 at $DIR/match_arm_scopes.rs:+3:41: +3:42
- goto -> bb22; // scope 0 at $DIR/match_arm_scopes.rs:+3:41: +3:42
+ goto -> bb19; // scope 0 at $DIR/match_arm_scopes.rs:+3:41: +3:42
}
2021-01-01 12:38:11 -06:00
- bb22: {
2022-11-02 16:54:49 -05:00
- drop(_2) -> [return: bb24, unwind: bb26]; // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
2020-10-02 15:11:24 -05:00
+ bb19: {
2022-11-02 16:54:49 -05:00
+ goto -> bb26; // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
2020-10-02 15:11:24 -05:00
}
2021-01-01 12:38:11 -06:00
- bb23: {
2020-10-02 15:11:24 -05:00
+ bb20: {
2022-11-02 16:54:49 -05:00
StorageDead(_8); // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
StorageDead(_6); // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
- drop(_2) -> [return: bb24, unwind: bb26]; // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
+ drop(_2) -> [return: bb21, unwind: bb23]; // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
2020-10-02 15:11:24 -05:00
}
2021-01-01 12:38:11 -06:00
- bb24: {
2020-10-02 15:11:24 -05:00
+ bb21: {
2022-11-02 16:54:49 -05:00
return; // scope 0 at $DIR/match_arm_scopes.rs:+5:2: +5:2
2020-10-02 15:11:24 -05:00
}
2021-01-01 12:38:11 -06:00
- bb25 (cleanup): {
2022-11-02 16:54:49 -05:00
- drop(_2) -> bb26; // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
2020-10-02 15:11:24 -05:00
+ bb22 (cleanup): {
2022-11-02 16:54:49 -05:00
+ goto -> bb27; // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
2020-10-02 15:11:24 -05:00
}
2021-01-01 12:38:11 -06:00
- bb26 (cleanup): {
2020-10-02 15:11:24 -05:00
+ bb23 (cleanup): {
2022-11-02 16:54:49 -05:00
resume; // scope 0 at $DIR/match_arm_scopes.rs:+0:1: +5:2
+ }
+
2020-10-02 15:11:24 -05:00
+ bb24: {
2022-11-02 16:54:49 -05:00
+ goto -> bb21; // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
+ }
+
+ bb25 (cleanup): {
2022-11-02 16:54:49 -05:00
+ goto -> bb23; // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
+ }
+
+ bb26: {
2022-11-02 16:54:49 -05:00
+ goto -> bb24; // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
+ }
+
+ bb27 (cleanup): {
2022-11-02 16:54:49 -05:00
+ goto -> bb23; // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
}
}