]> git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / mir-opt / match_false_edges.full_tested_match.PromoteTemps.after.mir
1 // MIR for `full_tested_match` after PromoteTemps
2
3 fn full_tested_match() -> () {
4 let mut _0: (); // return place in scope 0 at $DIR/match_false_edges.rs:+0:28: +0:28
5 let mut _1: (i32, i32); // in scope 0 at $DIR/match_false_edges.rs:+1:13: +5:6
6 let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
7 let mut _3: isize; // in scope 0 at $DIR/match_false_edges.rs:+2:9: +2:16
8 let mut _4: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
9 let _5: i32; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
10 let _6: &i32; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
11 let mut _7: bool; // in scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
12 let mut _8: i32; // in scope 0 at $DIR/match_false_edges.rs:+2:35: +2:36
13 let _9: i32; // in scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
14 let mut _10: i32; // in scope 0 at $DIR/match_false_edges.rs:+3:24: +3:25
15 let mut _11: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
16 scope 1 {
17 }
18 scope 2 {
19 debug x => _5; // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:15
20 debug x => _6; // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:15
21 }
22 scope 3 {
23 debug y => _9; // in scope 3 at $DIR/match_false_edges.rs:+3:14: +3:15
24 }
25
26 bb0: {
27 StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:+1:13: +5:6
28 StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
29 _2 = Option::<i32>::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
30 FakeRead(ForMatchedPlace(None), _2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
31 _3 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
32 switchInt(move _3) -> [0_isize: bb1, 1_isize: bb2, otherwise: bb4]; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:27
33 }
34
35 bb1: {
36 _1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:+4:17: +4:23
37 goto -> bb10; // scope 0 at $DIR/match_false_edges.rs:+4:17: +4:23
38 }
39
40 bb2: {
41 falseEdge -> [real: bb5, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+2:9: +2:16
42 }
43
44 bb3: {
45 falseEdge -> [real: bb9, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:16
46 }
47
48 bb4: {
49 unreachable; // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
50 }
51
52 bb5: {
53 StorageLive(_6); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
54 _11 = const _; // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
55 // mir::Constant
56 // + span: $DIR/match_false_edges.rs:14:14: 14:15
57 // + literal: Const { ty: &Option<i32>, val: Unevaluated(full_tested_match, [], Some(promoted[0])) }
58 _6 = &(((*_11) as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
59 _4 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
60 StorageLive(_7); // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
61 _7 = guard() -> [return: bb6, unwind: bb11]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
62 // mir::Constant
63 // + span: $DIR/match_false_edges.rs:14:20: 14:25
64 // + literal: Const { ty: fn() -> bool {guard}, val: Value(<ZST>) }
65 }
66
67 bb6: {
68 switchInt(move _7) -> [false: bb8, otherwise: bb7]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
69 }
70
71 bb7: {
72 StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
73 FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
74 FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
75 StorageLive(_5); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
76 _5 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
77 StorageLive(_8); // scope 2 at $DIR/match_false_edges.rs:+2:35: +2:36
78 _8 = _5; // scope 2 at $DIR/match_false_edges.rs:+2:35: +2:36
79 _1 = (const 1_i32, move _8); // scope 2 at $DIR/match_false_edges.rs:+2:31: +2:37
80 StorageDead(_8); // scope 2 at $DIR/match_false_edges.rs:+2:36: +2:37
81 StorageDead(_5); // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
82 StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
83 goto -> bb10; // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
84 }
85
86 bb8: {
87 StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
88 StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
89 goto -> bb3; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
90 }
91
92 bb9: {
93 StorageLive(_9); // scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
94 _9 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
95 StorageLive(_10); // scope 3 at $DIR/match_false_edges.rs:+3:24: +3:25
96 _10 = _9; // scope 3 at $DIR/match_false_edges.rs:+3:24: +3:25
97 _1 = (const 2_i32, move _10); // scope 3 at $DIR/match_false_edges.rs:+3:20: +3:26
98 StorageDead(_10); // scope 3 at $DIR/match_false_edges.rs:+3:25: +3:26
99 StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:+3:25: +3:26
100 goto -> bb10; // scope 0 at $DIR/match_false_edges.rs:+3:25: +3:26
101 }
102
103 bb10: {
104 StorageDead(_2); // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
105 StorageDead(_1); // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
106 _0 = const (); // scope 0 at $DIR/match_false_edges.rs:+0:28: +6:2
107 return; // scope 0 at $DIR/match_false_edges.rs:+6:2: +6:2
108 }
109
110 bb11 (cleanup): {
111 resume; // scope 0 at $DIR/match_false_edges.rs:+0:1: +6:2
112 }
113 }