]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff
Auto merge of #80746 - ehuss:update-cargo, r=ehuss
[rust.git] / src / test / mir-opt / issue_73223.main.PreCodegen.32bit.diff
1 - // MIR for `main` before PreCodegen
2 + // MIR for `main` after PreCodegen
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/issue-73223.rs:1:11: 1:11
6       let _1: i32;                         // in scope 0 at $DIR/issue-73223.rs:2:9: 2:14
7       let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/issue-73223.rs:2:23: 2:30
8       let _3: i32;                         // in scope 0 at $DIR/issue-73223.rs:3:14: 3:15
9       let mut _5: (&i32, &i32);            // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
10       let mut _6: &i32;                    // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
11       let mut _9: bool;                    // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
12       let mut _10: bool;                   // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
13       let mut _11: i32;                    // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
14       let mut _12: std::fmt::Arguments;    // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
15       let mut _13: &[&str; 3];             // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
16       let mut _14: &[std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
17       let _15: [std::fmt::ArgumentV1; 2];  // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
18       let mut _16: (&&i32, &&i32);         // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
19       let _17: &i32;                       // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
20       let mut _18: &&i32;                  // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
21       let _19: &i32;                       // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
22       let mut _20: std::fmt::ArgumentV1;   // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
23       let mut _21: std::fmt::ArgumentV1;   // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
24       scope 1 {
25           debug split => _1;               // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14
26           let _4: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14
27           scope 3 {
28               debug _prev => _4;           // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14
29               let _7: &i32;                // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
30               let _8: &i32;                // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
31               scope 4 {
32                   debug left_val => _7;    // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
33                   debug right_val => _8;   // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
34                   scope 5 {
35                       debug arg0 => _24;   // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
36                       debug arg1 => _27;   // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
37                       scope 6 (inlined ArgumentV1::new::<&i32>) { // at $SRC_DIR/core/src/macros/mod.rs:LL:COL
38                           debug x => _24;  // in scope 6 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
39                           debug f => _23;  // in scope 6 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
40                           let mut _22: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
41                           let mut _23: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
42                           let mut _24: &&i32; // in scope 6 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
43                           scope 7 {
44                           }
45                       }
46                       scope 8 (inlined ArgumentV1::new::<&i32>) { // at $SRC_DIR/core/src/macros/mod.rs:LL:COL
47                           debug x => _27;  // in scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
48                           debug f => _26;  // in scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
49                           let mut _25: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
50                           let mut _26: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
51                           let mut _27: &&i32; // in scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
52                           scope 9 {
53                           }
54                       }
55                   }
56                   scope 10 (inlined Arguments::new_v1) { // at $SRC_DIR/core/src/macros/mod.rs:LL:COL
57                       debug pieces => (_12.0: &[&str]); // in scope 10 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
58                       debug args => _29;   // in scope 10 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
59                       let mut _28: std::option::Option<&[std::fmt::rt::v1::Argument]>; // in scope 10 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
60                       let mut _29: &[std::fmt::ArgumentV1]; // in scope 10 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
61                   }
62               }
63           }
64       }
65       scope 2 {
66           debug v => _3;                   // in scope 2 at $DIR/issue-73223.rs:3:14: 3:15
67       }
68   
69       bb0: {
70           StorageLive(_1);                 // scope 0 at $DIR/issue-73223.rs:2:9: 2:14
71           StorageLive(_2);                 // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
72           ((_2 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
73           discriminant(_2) = 1;            // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
74           StorageLive(_3);                 // scope 0 at $DIR/issue-73223.rs:3:14: 3:15
75           _3 = ((_2 as Some).0: i32);      // scope 0 at $DIR/issue-73223.rs:3:14: 3:15
76           _1 = _3;                         // scope 2 at $DIR/issue-73223.rs:3:20: 3:21
77           StorageDead(_3);                 // scope 0 at $DIR/issue-73223.rs:3:20: 3:21
78           StorageDead(_2);                 // scope 0 at $DIR/issue-73223.rs:5:6: 5:7
79           ((_4 as Some).0: i32) = _1;      // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
80           discriminant(_4) = 1;            // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
81           (_5.0: &i32) = &_1;              // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
82           _6 = const main::promoted[1];    // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
83                                            // ty::Const
84                                            // + ty: &i32
85                                            // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1]))
86                                            // mir::Constant
87                                            // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
88                                            // + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1])) }
89           (_5.1: &i32) = move _6;          // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
90           StorageLive(_7);                 // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
91           _7 = (_5.0: &i32);               // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
92           StorageLive(_8);                 // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
93           _8 = (_5.1: &i32);               // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
94           StorageLive(_9);                 // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
95           StorageLive(_10);                // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
96           StorageLive(_11);                // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
97           _11 = (*_7);                     // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
98           _10 = Eq(move _11, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
99           StorageDead(_11);                // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
100           _9 = Not(move _10);              // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
101           StorageDead(_10);                // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
102           switchInt(_9) -> [false: bb1, otherwise: bb2]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
103       }
104   
105       bb1: {
106           StorageDead(_9);                 // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
107           StorageDead(_8);                 // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
108           StorageDead(_7);                 // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
109           _0 = const ();                   // scope 0 at $DIR/issue-73223.rs:1:11: 9:2
110           StorageDead(_1);                 // scope 0 at $DIR/issue-73223.rs:9:1: 9:2
111           return;                          // scope 0 at $DIR/issue-73223.rs:9:2: 9:2
112       }
113   
114       bb2: {
115           _13 = const main::promoted[0];   // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
116                                            // ty::Const
117                                            // + ty: &[&str; 3]
118                                            // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0]))
119                                            // mir::Constant
120                                            // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
121                                            // + literal: Const { ty: &[&str; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
122           (_12.0: &[&str]) = move _13 as &[&str] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
123           StorageLive(_15);                // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
124           StorageLive(_17);                // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
125           _17 = _7;                        // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
126           (_16.0: &&i32) = &_17;           // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
127           StorageLive(_18);                // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
128           StorageLive(_19);                // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
129           _19 = _8;                        // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
130           _18 = &_19;                      // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
131           (_16.1: &&i32) = move _18;       // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
132           StorageDead(_18);                // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
133           _24 = (_16.0: &&i32);            // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
134           _27 = (_16.1: &&i32);            // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
135           _23 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
136                                            // mir::Constant
137                                            // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
138                                            // + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
139           StorageLive(_22);                // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
140           _22 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _23) -> bb3; // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
141                                            // mir::Constant
142                                            // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
143                                            // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }
144       }
145   
146       bb3: {
147           (_20.0: &core::fmt::Opaque) = transmute::<&&i32, &core::fmt::Opaque>(move _24) -> bb4; // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
148                                            // mir::Constant
149                                            // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
150                                            // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar(<ZST>)) }
151       }
152   
153       bb4: {
154           (_20.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _22; // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
155           StorageDead(_22);                // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
156           _26 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
157                                            // mir::Constant
158                                            // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
159                                            // + literal: Const { ty: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
160           StorageLive(_25);                // scope 9 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
161           _25 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _26) -> bb5; // scope 9 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
162                                            // mir::Constant
163                                            // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
164                                            // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }
165       }
166   
167       bb5: {
168           (_21.0: &core::fmt::Opaque) = transmute::<&&i32, &core::fmt::Opaque>(move _27) -> bb6; // scope 9 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
169                                            // mir::Constant
170                                            // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
171                                            // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar(<ZST>)) }
172       }
173   
174       bb6: {
175           (_21.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _25; // scope 9 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
176           StorageDead(_25);                // scope 9 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
177           _15 = [move _20, move _21];      // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
178           _14 = &_15;                      // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
179           _29 = move _14 as &[std::fmt::ArgumentV1] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
180           StorageLive(_28);                // scope 10 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
181           discriminant(_28) = 0;           // scope 10 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
182           (_12.1: std::option::Option<&[std::fmt::rt::v1::Argument]>) = move _28; // scope 10 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
183           (_12.2: &[std::fmt::ArgumentV1]) = move _29; // scope 10 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
184           StorageDead(_28);                // scope 10 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
185           core::panicking::panic_fmt(move _12); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
186                                            // mir::Constant
187                                            // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
188                                            // + literal: Const { ty: for<'r> fn(std::fmt::Arguments<'r>) -> ! {core::panicking::panic_fmt}, val: Value(Scalar(<ZST>)) }
189       }
190   }
191