]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/matches_reduce_branches.bar.MatchBranchSimplification.diff.32bit
Rollup merge of #75485 - RalfJung:pin, r=nagisa
[rust.git] / src / test / mir-opt / matches_reduce_branches.bar.MatchBranchSimplification.diff.32bit
1 - // MIR for `bar` before MatchBranchSimplification
2 + // MIR for `bar` after MatchBranchSimplification
3   
4   fn bar(_1: i32) -> (bool, bool, bool, bool) {
5       debug i => _1;                       // in scope 0 at $DIR/matches_reduce_branches.rs:11:8: 11:9
6       let mut _0: (bool, bool, bool, bool); // return place in scope 0 at $DIR/matches_reduce_branches.rs:11:19: 11:43
7       let _2: bool;                        // in scope 0 at $DIR/matches_reduce_branches.rs:12:9: 12:10
8       let _6: ();                          // in scope 0 at $DIR/matches_reduce_branches.rs:17:5: 32:6
9       let mut _7: bool;                    // in scope 0 at $DIR/matches_reduce_branches.rs:34:6: 34:7
10       let mut _8: bool;                    // in scope 0 at $DIR/matches_reduce_branches.rs:34:9: 34:10
11       let mut _9: bool;                    // in scope 0 at $DIR/matches_reduce_branches.rs:34:12: 34:13
12       let mut _10: bool;                   // in scope 0 at $DIR/matches_reduce_branches.rs:34:15: 34:16
13       scope 1 {
14           debug a => _2;                   // in scope 1 at $DIR/matches_reduce_branches.rs:12:9: 12:10
15           let _3: bool;                    // in scope 1 at $DIR/matches_reduce_branches.rs:13:9: 13:10
16           scope 2 {
17               debug b => _3;               // in scope 2 at $DIR/matches_reduce_branches.rs:13:9: 13:10
18               let _4: bool;                // in scope 2 at $DIR/matches_reduce_branches.rs:14:9: 14:10
19               scope 3 {
20                   debug c => _4;           // in scope 3 at $DIR/matches_reduce_branches.rs:14:9: 14:10
21                   let _5: bool;            // in scope 3 at $DIR/matches_reduce_branches.rs:15:9: 15:10
22                   scope 4 {
23                       debug d => _5;       // in scope 4 at $DIR/matches_reduce_branches.rs:15:9: 15:10
24                   }
25               }
26           }
27       }
28   
29       bb0: {
30           StorageLive(_2);                 // scope 0 at $DIR/matches_reduce_branches.rs:12:9: 12:10
31           StorageLive(_3);                 // scope 1 at $DIR/matches_reduce_branches.rs:13:9: 13:10
32           StorageLive(_4);                 // scope 2 at $DIR/matches_reduce_branches.rs:14:9: 14:10
33           StorageLive(_5);                 // scope 3 at $DIR/matches_reduce_branches.rs:15:9: 15:10
34           StorageLive(_6);                 // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6
35 -         switchInt(_1) -> [7_i32: bb2, otherwise: bb1]; // scope 4 at $DIR/matches_reduce_branches.rs:18:9: 18:10
36 +         _2 = Ne(_1, const 7_i32);        // scope 4 at $DIR/matches_reduce_branches.rs:19:13: 19:22
37 +                                          // ty::Const
38 +                                          // + ty: i32
39 +                                          // + val: Value(Scalar(0x00000007))
40 +                                          // mir::Constant
41 +                                          // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1
42 +                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000007)) }
43 +         _3 = Eq(_1, const 7_i32);        // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:21
44 +                                          // ty::Const
45 +                                          // + ty: i32
46 +                                          // + val: Value(Scalar(0x00000007))
47 +                                          // mir::Constant
48 +                                          // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1
49 +                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000007)) }
50 +         _4 = const false;                // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:22
51 +                                          // ty::Const
52 +                                          // + ty: bool
53 +                                          // + val: Value(Scalar(0x00))
54 +                                          // mir::Constant
55 +                                          // + span: $DIR/matches_reduce_branches.rs:21:17: 21:22
56 +                                          // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
57 +         _5 = const true;                 // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21
58 +                                          // ty::Const
59 +                                          // + ty: bool
60 +                                          // + val: Value(Scalar(0x01))
61 +                                          // mir::Constant
62 +                                          // + span: $DIR/matches_reduce_branches.rs:22:17: 22:21
63 +                                          // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
64 +         goto -> bb3;                     // scope 4 at $DIR/matches_reduce_branches.rs:18:9: 18:10
65       }
66   
67       bb1: {
68           _2 = const true;                 // scope 4 at $DIR/matches_reduce_branches.rs:26:13: 26:21
69                                            // ty::Const
70                                            // + ty: bool
71                                            // + val: Value(Scalar(0x01))
72                                            // mir::Constant
73                                            // + span: $DIR/matches_reduce_branches.rs:26:17: 26:21
74                                            // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
75           _3 = const false;                // scope 4 at $DIR/matches_reduce_branches.rs:27:13: 27:22
76                                            // ty::Const
77                                            // + ty: bool
78                                            // + val: Value(Scalar(0x00))
79                                            // mir::Constant
80                                            // + span: $DIR/matches_reduce_branches.rs:27:17: 27:22
81                                            // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
82           _4 = const false;                // scope 4 at $DIR/matches_reduce_branches.rs:28:13: 28:22
83                                            // ty::Const
84                                            // + ty: bool
85                                            // + val: Value(Scalar(0x00))
86                                            // mir::Constant
87                                            // + span: $DIR/matches_reduce_branches.rs:28:17: 28:22
88                                            // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
89           _5 = const true;                 // scope 4 at $DIR/matches_reduce_branches.rs:29:13: 29:21
90                                            // ty::Const
91                                            // + ty: bool
92                                            // + val: Value(Scalar(0x01))
93                                            // mir::Constant
94                                            // + span: $DIR/matches_reduce_branches.rs:29:17: 29:21
95                                            // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
96           goto -> bb3;                     // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6
97       }
98   
99       bb2: {
100           _2 = const false;                // scope 4 at $DIR/matches_reduce_branches.rs:19:13: 19:22
101                                            // ty::Const
102                                            // + ty: bool
103                                            // + val: Value(Scalar(0x00))
104                                            // mir::Constant
105                                            // + span: $DIR/matches_reduce_branches.rs:19:17: 19:22
106                                            // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
107           _3 = const true;                 // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:21
108                                            // ty::Const
109                                            // + ty: bool
110                                            // + val: Value(Scalar(0x01))
111                                            // mir::Constant
112                                            // + span: $DIR/matches_reduce_branches.rs:20:17: 20:21
113                                            // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
114           _4 = const false;                // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:22
115                                            // ty::Const
116                                            // + ty: bool
117                                            // + val: Value(Scalar(0x00))
118                                            // mir::Constant
119                                            // + span: $DIR/matches_reduce_branches.rs:21:17: 21:22
120                                            // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
121           _5 = const true;                 // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21
122                                            // ty::Const
123                                            // + ty: bool
124                                            // + val: Value(Scalar(0x01))
125                                            // mir::Constant
126                                            // + span: $DIR/matches_reduce_branches.rs:22:17: 22:21
127                                            // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
128           goto -> bb3;                     // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6
129       }
130   
131       bb3: {
132           StorageDead(_6);                 // scope 4 at $DIR/matches_reduce_branches.rs:32:6: 32:7
133           StorageLive(_7);                 // scope 4 at $DIR/matches_reduce_branches.rs:34:6: 34:7
134           _7 = _2;                         // scope 4 at $DIR/matches_reduce_branches.rs:34:6: 34:7
135           StorageLive(_8);                 // scope 4 at $DIR/matches_reduce_branches.rs:34:9: 34:10
136           _8 = _3;                         // scope 4 at $DIR/matches_reduce_branches.rs:34:9: 34:10
137           StorageLive(_9);                 // scope 4 at $DIR/matches_reduce_branches.rs:34:12: 34:13
138           _9 = _4;                         // scope 4 at $DIR/matches_reduce_branches.rs:34:12: 34:13
139           StorageLive(_10);                // scope 4 at $DIR/matches_reduce_branches.rs:34:15: 34:16
140           _10 = _5;                        // scope 4 at $DIR/matches_reduce_branches.rs:34:15: 34:16
141           (_0.0: bool) = move _7;          // scope 4 at $DIR/matches_reduce_branches.rs:34:5: 34:17
142           (_0.1: bool) = move _8;          // scope 4 at $DIR/matches_reduce_branches.rs:34:5: 34:17
143           (_0.2: bool) = move _9;          // scope 4 at $DIR/matches_reduce_branches.rs:34:5: 34:17
144           (_0.3: bool) = move _10;         // scope 4 at $DIR/matches_reduce_branches.rs:34:5: 34:17
145           StorageDead(_10);                // scope 4 at $DIR/matches_reduce_branches.rs:34:16: 34:17
146           StorageDead(_9);                 // scope 4 at $DIR/matches_reduce_branches.rs:34:16: 34:17
147           StorageDead(_8);                 // scope 4 at $DIR/matches_reduce_branches.rs:34:16: 34:17
148           StorageDead(_7);                 // scope 4 at $DIR/matches_reduce_branches.rs:34:16: 34:17
149           StorageDead(_5);                 // scope 3 at $DIR/matches_reduce_branches.rs:35:1: 35:2
150           StorageDead(_4);                 // scope 2 at $DIR/matches_reduce_branches.rs:35:1: 35:2
151           StorageDead(_3);                 // scope 1 at $DIR/matches_reduce_branches.rs:35:1: 35:2
152           StorageDead(_2);                 // scope 0 at $DIR/matches_reduce_branches.rs:35:1: 35:2
153           return;                          // scope 0 at $DIR/matches_reduce_branches.rs:35:2: 35:2
154       }
155   }
156