]> git.proxmox.com Git - rustc.git/blame - src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / mir-opt / match_false_edges.main.PromoteTemps.before.mir
CommitLineData
ba9703b0
XL
1// MIR for `main` before PromoteTemps
2
3fn main() -> () {
064997fb
FG
4 let mut _0: (); // return place in scope 0 at $DIR/match_false_edges.rs:+0:11: +0:11
5 let mut _1: i32; // in scope 0 at $DIR/match_false_edges.rs:+1:13: +6:6
6 let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
7 let mut _3: isize; // in scope 0 at $DIR/match_false_edges.rs:+4:9: +4:16
8 let mut _4: isize; // in scope 0 at $DIR/match_false_edges.rs:+2:9: +2:17
9 let mut _5: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
10 let _6: i32; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
11 let _7: &i32; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
12 let mut _8: bool; // in scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
13 let _9: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
14 let _10: i32; // in scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
15 let _11: &i32; // in scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
16 let mut _12: bool; // in scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
17 let mut _13: i32; // in scope 0 at $DIR/match_false_edges.rs:+4:27: +4:28
18 let _14: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+5:9: +5:11
ba9703b0
XL
19 scope 1 {
20 }
21 scope 2 {
064997fb
FG
22 debug _w => _6; // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:16
23 debug _w => _7; // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:16
ba9703b0
XL
24 }
25 scope 3 {
064997fb 26 debug _x => _9; // in scope 3 at $DIR/match_false_edges.rs:+3:9: +3:11
ba9703b0
XL
27 }
28 scope 4 {
064997fb
FG
29 debug y => _10; // in scope 4 at $DIR/match_false_edges.rs:+4:14: +4:15
30 debug y => _11; // in scope 4 at $DIR/match_false_edges.rs:+4:14: +4:15
ba9703b0
XL
31 }
32 scope 5 {
064997fb 33 debug _z => _14; // in scope 5 at $DIR/match_false_edges.rs:+5:9: +5:11
ba9703b0
XL
34 }
35
36 bb0: {
064997fb
FG
37 StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:+1:13: +6:6
38 StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
39 _2 = Option::<i32>::Some(const 1_i32); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
40 FakeRead(ForMatchedPlace(None), _2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
41 _4 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
42 switchInt(move _4) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
ba9703b0
XL
43 }
44
29967ef6 45 bb1: {
064997fb 46 falseEdge -> [real: bb9, imaginary: bb4]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
ba9703b0
XL
47 }
48
49 bb2: {
064997fb 50 falseEdge -> [real: bb5, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:9: +2:17
ba9703b0
XL
51 }
52
53 bb3: {
064997fb
FG
54 StorageLive(_14); // scope 0 at $DIR/match_false_edges.rs:+5:9: +5:11
55 _14 = _2; // scope 0 at $DIR/match_false_edges.rs:+5:9: +5:11
56 _1 = const 4_i32; // scope 5 at $DIR/match_false_edges.rs:+5:15: +5:16
57 StorageDead(_14); // scope 0 at $DIR/match_false_edges.rs:+5:15: +5:16
58 goto -> bb14; // scope 0 at $DIR/match_false_edges.rs:+5:15: +5:16
ba9703b0
XL
59 }
60
29967ef6 61 bb4: {
064997fb 62 falseEdge -> [real: bb10, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+4:9: +4:16
ba9703b0
XL
63 }
64
29967ef6 65 bb5: {
064997fb
FG
66 StorageLive(_7); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
67 _7 = &((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
68 _5 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
69 StorageLive(_8); // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
70 _8 = guard() -> [return: bb6, unwind: bb15]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
ba9703b0 71 // mir::Constant
923072b8 72 // + span: $DIR/match_false_edges.rs:34:21: 34:26
064997fb 73 // + literal: Const { ty: fn() -> bool {guard}, val: Value(<ZST>) }
ba9703b0
XL
74 }
75
29967ef6 76 bb6: {
064997fb 77 switchInt(move _8) -> [false: bb8, otherwise: bb7]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
ba9703b0
XL
78 }
79
29967ef6 80 bb7: {
064997fb
FG
81 StorageDead(_8); // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
82 FakeRead(ForMatchGuard, _5); // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
83 FakeRead(ForGuardBinding, _7); // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
84 StorageLive(_6); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
85 _6 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
86 _1 = const 1_i32; // scope 2 at $DIR/match_false_edges.rs:+2:32: +2:33
87 StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
88 StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
89 goto -> bb14; // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
ba9703b0
XL
90 }
91
29967ef6 92 bb8: {
064997fb
FG
93 StorageDead(_8); // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
94 StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
95 falseEdge -> [real: bb1, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
ba9703b0
XL
96 }
97
29967ef6 98 bb9: {
064997fb
FG
99 StorageLive(_9); // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
100 _9 = _2; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
101 _1 = const 2_i32; // scope 3 at $DIR/match_false_edges.rs:+3:15: +3:16
102 StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:+3:15: +3:16
103 goto -> bb14; // scope 0 at $DIR/match_false_edges.rs:+3:15: +3:16
ba9703b0
XL
104 }
105
29967ef6 106 bb10: {
064997fb
FG
107 StorageLive(_11); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
108 _11 = &((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
109 _5 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
110 StorageLive(_12); // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
111 StorageLive(_13); // scope 0 at $DIR/match_false_edges.rs:+4:27: +4:28
112 _13 = (*_11); // scope 0 at $DIR/match_false_edges.rs:+4:27: +4:28
113 _12 = guard2(move _13) -> [return: bb11, unwind: bb15]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
ba9703b0 114 // mir::Constant
923072b8 115 // + span: $DIR/match_false_edges.rs:36:20: 36:26
064997fb 116 // + literal: Const { ty: fn(i32) -> bool {guard2}, val: Value(<ZST>) }
ba9703b0
XL
117 }
118
29967ef6 119 bb11: {
064997fb 120 switchInt(move _12) -> [false: bb13, otherwise: bb12]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
ba9703b0
XL
121 }
122
29967ef6 123 bb12: {
064997fb
FG
124 StorageDead(_13); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
125 StorageDead(_12); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
126 FakeRead(ForMatchGuard, _5); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
127 FakeRead(ForGuardBinding, _11); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
128 StorageLive(_10); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
129 _10 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
130 _1 = const 3_i32; // scope 4 at $DIR/match_false_edges.rs:+4:33: +4:34
131 StorageDead(_10); // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
132 StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
133 goto -> bb14; // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
ba9703b0
XL
134 }
135
29967ef6 136 bb13: {
064997fb
FG
137 StorageDead(_13); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
138 StorageDead(_12); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
139 StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
140 falseEdge -> [real: bb3, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
ba9703b0
XL
141 }
142
29967ef6 143 bb14: {
064997fb
FG
144 StorageDead(_2); // scope 0 at $DIR/match_false_edges.rs:+6:6: +6:7
145 StorageDead(_1); // scope 0 at $DIR/match_false_edges.rs:+6:6: +6:7
146 _0 = const (); // scope 0 at $DIR/match_false_edges.rs:+0:11: +7:2
147 return; // scope 0 at $DIR/match_false_edges.rs:+7:2: +7:2
ba9703b0 148 }
29967ef6
XL
149
150 bb15 (cleanup): {
064997fb 151 resume; // scope 0 at $DIR/match_false_edges.rs:+0:1: +7:2
29967ef6 152 }
ba9703b0 153}