]> git.proxmox.com Git - rustc.git/blame - src/test/mir-opt/match_test/rustc.main.SimplifyCfg-initial.after.mir
New upstream version 1.46.0+dfsg1
[rustc.git] / src / test / mir-opt / match_test / rustc.main.SimplifyCfg-initial.after.mir
CommitLineData
ba9703b0
XL
1// MIR for `main` after SimplifyCfg-initial
2
3fn main() -> () {
4 let mut _0: (); // return place in scope 0 at $DIR/match_test.rs:6:11: 6:11
5 let _1: i32; // in scope 0 at $DIR/match_test.rs:7:9: 7:10
6 let _3: i32; // in scope 0 at $DIR/match_test.rs:12:5: 17:6
7 let mut _4: bool; // in scope 0 at $DIR/match_test.rs:14:9: 14:16
8 let mut _5: bool; // in scope 0 at $DIR/match_test.rs:14:9: 14:16
9 let mut _6: bool; // in scope 0 at $DIR/match_test.rs:13:9: 13:14
10 let mut _7: bool; // in scope 0 at $DIR/match_test.rs:13:9: 13:14
11 let mut _8: &i32; // in scope 0 at $DIR/match_test.rs:12:11: 12:12
12 let mut _9: bool; // in scope 0 at $DIR/match_test.rs:13:18: 13:19
13 scope 1 {
14 debug x => _1; // in scope 1 at $DIR/match_test.rs:7:9: 7:10
15 let _2: bool; // in scope 1 at $DIR/match_test.rs:8:9: 8:10
16 scope 2 {
17 debug b => _2; // in scope 2 at $DIR/match_test.rs:8:9: 8:10
18 }
19 }
20
21 bb0: {
f9f354fc 22 StorageLive(_1); // scope 0 at $DIR/match_test.rs:7:9: 7:10
f035d41b 23 _1 = const 3_i32; // scope 0 at $DIR/match_test.rs:7:13: 7:14
ba9703b0
XL
24 // ty::Const
25 // + ty: i32
26 // + val: Value(Scalar(0x00000003))
27 // mir::Constant
28 // + span: $DIR/match_test.rs:7:13: 7:14
29 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
f9f354fc
XL
30 FakeRead(ForLet, _1); // scope 0 at $DIR/match_test.rs:7:9: 7:10
31 StorageLive(_2); // scope 1 at $DIR/match_test.rs:8:9: 8:10
32 _2 = const true; // scope 1 at $DIR/match_test.rs:8:13: 8:17
ba9703b0
XL
33 // ty::Const
34 // + ty: bool
35 // + val: Value(Scalar(0x01))
36 // mir::Constant
37 // + span: $DIR/match_test.rs:8:13: 8:17
38 // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
f9f354fc
XL
39 FakeRead(ForLet, _2); // scope 1 at $DIR/match_test.rs:8:9: 8:10
40 StorageLive(_3); // scope 2 at $DIR/match_test.rs:12:5: 17:6
41 FakeRead(ForMatchedPlace, _1); // scope 2 at $DIR/match_test.rs:12:11: 12:12
f035d41b 42 _6 = Le(const 0_i32, _1); // scope 2 at $DIR/match_test.rs:13:9: 13:14
ba9703b0
XL
43 // ty::Const
44 // + ty: i32
45 // + val: Value(Scalar(0x00000000))
46 // mir::Constant
47 // + span: $DIR/match_test.rs:13:9: 13:14
48 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
f9f354fc 49 switchInt(move _6) -> [false: bb4, otherwise: bb1]; // scope 2 at $DIR/match_test.rs:13:9: 13:14
ba9703b0
XL
50 }
51
52 bb1: {
f035d41b 53 _7 = Lt(_1, const 10_i32); // scope 2 at $DIR/match_test.rs:13:9: 13:14
ba9703b0
XL
54 // ty::Const
55 // + ty: i32
56 // + val: Value(Scalar(0x0000000a))
57 // mir::Constant
58 // + span: $DIR/match_test.rs:13:9: 13:14
59 // + literal: Const { ty: i32, val: Value(Scalar(0x0000000a)) }
f9f354fc 60 switchInt(move _7) -> [false: bb4, otherwise: bb2]; // scope 2 at $DIR/match_test.rs:13:9: 13:14
ba9703b0
XL
61 }
62
63 bb2: {
f035d41b 64 falseEdge -> [real: bb9, imaginary: bb6]; // scope 2 at $DIR/match_test.rs:13:9: 13:14
ba9703b0
XL
65 }
66
67 bb3: {
f035d41b 68 _3 = const 3_i32; // scope 2 at $DIR/match_test.rs:16:14: 16:15
ba9703b0
XL
69 // ty::Const
70 // + ty: i32
71 // + val: Value(Scalar(0x00000003))
72 // mir::Constant
73 // + span: $DIR/match_test.rs:16:14: 16:15
74 // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
f9f354fc 75 goto -> bb14; // scope 2 at $DIR/match_test.rs:12:5: 17:6
ba9703b0
XL
76 }
77
78 bb4: {
f035d41b 79 _4 = Le(const 10_i32, _1); // scope 2 at $DIR/match_test.rs:14:9: 14:16
ba9703b0
XL
80 // ty::Const
81 // + ty: i32
82 // + val: Value(Scalar(0x0000000a))
83 // mir::Constant
84 // + span: $DIR/match_test.rs:14:9: 14:16
85 // + literal: Const { ty: i32, val: Value(Scalar(0x0000000a)) }
f9f354fc 86 switchInt(move _4) -> [false: bb7, otherwise: bb5]; // scope 2 at $DIR/match_test.rs:14:9: 14:16
ba9703b0
XL
87 }
88
89 bb5: {
f035d41b 90 _5 = Le(_1, const 20_i32); // scope 2 at $DIR/match_test.rs:14:9: 14:16
ba9703b0
XL
91 // ty::Const
92 // + ty: i32
93 // + val: Value(Scalar(0x00000014))
94 // mir::Constant
95 // + span: $DIR/match_test.rs:14:9: 14:16
96 // + literal: Const { ty: i32, val: Value(Scalar(0x00000014)) }
f9f354fc 97 switchInt(move _5) -> [false: bb7, otherwise: bb6]; // scope 2 at $DIR/match_test.rs:14:9: 14:16
ba9703b0
XL
98 }
99
100 bb6: {
f035d41b 101 falseEdge -> [real: bb12, imaginary: bb8]; // scope 2 at $DIR/match_test.rs:14:9: 14:16
ba9703b0
XL
102 }
103
104 bb7: {
f035d41b 105 switchInt(_1) -> [-1_i32: bb8, otherwise: bb3]; // scope 2 at $DIR/match_test.rs:15:9: 15:11
ba9703b0
XL
106 }
107
108 bb8: {
f035d41b 109 falseEdge -> [real: bb13, imaginary: bb3]; // scope 2 at $DIR/match_test.rs:15:9: 15:11
ba9703b0
XL
110 }
111
112 bb9: {
f9f354fc
XL
113 _8 = &shallow _1; // scope 2 at $DIR/match_test.rs:12:11: 12:12
114 StorageLive(_9); // scope 2 at $DIR/match_test.rs:13:18: 13:19
115 _9 = _2; // scope 2 at $DIR/match_test.rs:13:18: 13:19
116 switchInt(move _9) -> [false: bb11, otherwise: bb10]; // scope 2 at $DIR/match_test.rs:13:18: 13:19
ba9703b0
XL
117 }
118
119 bb10: {
f035d41b 120 StorageDead(_9); // scope 2 at $DIR/match_test.rs:13:23: 13:24
f9f354fc 121 FakeRead(ForMatchGuard, _8); // scope 2 at $DIR/match_test.rs:13:18: 13:19
f035d41b 122 _3 = const 0_i32; // scope 2 at $DIR/match_test.rs:13:23: 13:24
ba9703b0
XL
123 // ty::Const
124 // + ty: i32
125 // + val: Value(Scalar(0x00000000))
126 // mir::Constant
127 // + span: $DIR/match_test.rs:13:23: 13:24
128 // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
f9f354fc 129 goto -> bb14; // scope 2 at $DIR/match_test.rs:12:5: 17:6
ba9703b0
XL
130 }
131
132 bb11: {
f035d41b
XL
133 StorageDead(_9); // scope 2 at $DIR/match_test.rs:13:23: 13:24
134 falseEdge -> [real: bb3, imaginary: bb6]; // scope 2 at $DIR/match_test.rs:13:18: 13:19
ba9703b0
XL
135 }
136
137 bb12: {
f035d41b 138 _3 = const 1_i32; // scope 2 at $DIR/match_test.rs:14:20: 14:21
ba9703b0
XL
139 // ty::Const
140 // + ty: i32
141 // + val: Value(Scalar(0x00000001))
142 // mir::Constant
143 // + span: $DIR/match_test.rs:14:20: 14:21
144 // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
f9f354fc 145 goto -> bb14; // scope 2 at $DIR/match_test.rs:12:5: 17:6
ba9703b0
XL
146 }
147
148 bb13: {
f035d41b 149 _3 = const 2_i32; // scope 2 at $DIR/match_test.rs:15:15: 15:16
ba9703b0
XL
150 // ty::Const
151 // + ty: i32
152 // + val: Value(Scalar(0x00000002))
153 // mir::Constant
154 // + span: $DIR/match_test.rs:15:15: 15:16
155 // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
f9f354fc 156 goto -> bb14; // scope 2 at $DIR/match_test.rs:12:5: 17:6
ba9703b0
XL
157 }
158
159 bb14: {
f9f354fc
XL
160 StorageDead(_3); // scope 2 at $DIR/match_test.rs:17:6: 17:7
161 _0 = const (); // scope 0 at $DIR/match_test.rs:6:11: 18:2
ba9703b0
XL
162 // ty::Const
163 // + ty: ()
164 // + val: Value(Scalar(<ZST>))
165 // mir::Constant
166 // + span: $DIR/match_test.rs:6:11: 18:2
167 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
f9f354fc
XL
168 StorageDead(_2); // scope 1 at $DIR/match_test.rs:18:1: 18:2
169 StorageDead(_1); // scope 0 at $DIR/match_test.rs:18:1: 18:2
170 return; // scope 0 at $DIR/match_test.rs:18:2: 18:2
ba9703b0
XL
171 }
172}