]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff
Auto merge of #88469 - patrick-gu:master, r=dtolnay
[rust.git] / src / test / mir-opt / funky_arms.float_to_exponential_common.ConstProp.diff
1 - // MIR for `float_to_exponential_common` before ConstProp
2 + // MIR for `float_to_exponential_common` after ConstProp
3   
4   fn float_to_exponential_common(_1: &mut Formatter, _2: &T, _3: bool) -> Result<(), std::fmt::Error> {
5       debug fmt => _1;                     // in scope 0 at $DIR/funky_arms.rs:11:35: 11:38
6       debug num => _2;                     // in scope 0 at $DIR/funky_arms.rs:11:60: 11:63
7       debug upper => _3;                   // in scope 0 at $DIR/funky_arms.rs:11:69: 11:74
8       let mut _0: std::result::Result<(), std::fmt::Error>; // return place in scope 0 at $DIR/funky_arms.rs:11:85: 11:91
9       let _4: bool;                        // in scope 0 at $DIR/funky_arms.rs:15:9: 15:19
10       let mut _5: &std::fmt::Formatter;    // in scope 0 at $DIR/funky_arms.rs:15:22: 15:25
11       let mut _7: std::option::Option<usize>; // in scope 0 at $DIR/funky_arms.rs:24:30: 24:45
12       let mut _8: &std::fmt::Formatter;    // in scope 0 at $DIR/funky_arms.rs:24:30: 24:33
13       let mut _9: isize;                   // in scope 0 at $DIR/funky_arms.rs:24:12: 24:27
14       let mut _11: &mut std::fmt::Formatter; // in scope 0 at $DIR/funky_arms.rs:26:43: 26:46
15       let mut _12: &T;                     // in scope 0 at $DIR/funky_arms.rs:26:48: 26:51
16       let mut _13: core::num::flt2dec::Sign; // in scope 0 at $DIR/funky_arms.rs:26:53: 26:57
17       let mut _14: u32;                    // in scope 0 at $DIR/funky_arms.rs:26:59: 26:79
18       let mut _15: u32;                    // in scope 0 at $DIR/funky_arms.rs:26:59: 26:75
19       let mut _16: usize;                  // in scope 0 at $DIR/funky_arms.rs:26:59: 26:68
20       let mut _17: bool;                   // in scope 0 at $DIR/funky_arms.rs:26:81: 26:86
21       let mut _18: &mut std::fmt::Formatter; // in scope 0 at $DIR/funky_arms.rs:28:46: 28:49
22       let mut _19: &T;                     // in scope 0 at $DIR/funky_arms.rs:28:51: 28:54
23       let mut _20: core::num::flt2dec::Sign; // in scope 0 at $DIR/funky_arms.rs:28:56: 28:60
24       let mut _21: bool;                   // in scope 0 at $DIR/funky_arms.rs:28:62: 28:67
25       scope 1 {
26           debug force_sign => _4;          // in scope 1 at $DIR/funky_arms.rs:15:9: 15:19
27           let _6: core::num::flt2dec::Sign; // in scope 1 at $DIR/funky_arms.rs:19:9: 19:13
28           scope 2 {
29               debug sign => _6;            // in scope 2 at $DIR/funky_arms.rs:19:9: 19:13
30               let _10: usize;              // in scope 2 at $DIR/funky_arms.rs:24:17: 24:26
31               scope 3 {
32                   debug precision => _10;  // in scope 3 at $DIR/funky_arms.rs:24:17: 24:26
33               }
34           }
35       }
36   
37       bb0: {
38           StorageLive(_4);                 // scope 0 at $DIR/funky_arms.rs:15:9: 15:19
39           StorageLive(_5);                 // scope 0 at $DIR/funky_arms.rs:15:22: 15:25
40           _5 = &(*_1);                     // scope 0 at $DIR/funky_arms.rs:15:22: 15:25
41           _4 = Formatter::sign_plus(move _5) -> bb1; // scope 0 at $DIR/funky_arms.rs:15:22: 15:37
42                                            // mir::Constant
43                                            // + span: $DIR/funky_arms.rs:15:26: 15:35
44                                            // + literal: Const { ty: for<'r> fn(&'r std::fmt::Formatter) -> bool {std::fmt::Formatter::sign_plus}, val: Value(Scalar(<ZST>)) }
45       }
46   
47       bb1: {
48           StorageDead(_5);                 // scope 0 at $DIR/funky_arms.rs:15:36: 15:37
49           StorageLive(_6);                 // scope 1 at $DIR/funky_arms.rs:19:9: 19:13
50           switchInt(_4) -> [false: bb3, otherwise: bb2]; // scope 1 at $DIR/funky_arms.rs:19:16: 19:32
51       }
52   
53       bb2: {
54           discriminant(_6) = 1;            // scope 1 at $DIR/funky_arms.rs:21:17: 21:41
55           goto -> bb4;                     // scope 1 at $DIR/funky_arms.rs:21:17: 21:41
56       }
57   
58       bb3: {
59           discriminant(_6) = 0;            // scope 1 at $DIR/funky_arms.rs:20:18: 20:38
60           goto -> bb4;                     // scope 1 at $DIR/funky_arms.rs:20:18: 20:38
61       }
62   
63       bb4: {
64           StorageLive(_7);                 // scope 2 at $DIR/funky_arms.rs:24:30: 24:45
65           StorageLive(_8);                 // scope 2 at $DIR/funky_arms.rs:24:30: 24:33
66           _8 = &(*_1);                     // scope 2 at $DIR/funky_arms.rs:24:30: 24:33
67           _7 = Formatter::precision(move _8) -> bb5; // scope 2 at $DIR/funky_arms.rs:24:30: 24:45
68                                            // mir::Constant
69                                            // + span: $DIR/funky_arms.rs:24:34: 24:43
70                                            // + literal: Const { ty: for<'r> fn(&'r std::fmt::Formatter) -> std::option::Option<usize> {std::fmt::Formatter::precision}, val: Value(Scalar(<ZST>)) }
71       }
72   
73       bb5: {
74           StorageDead(_8);                 // scope 2 at $DIR/funky_arms.rs:24:44: 24:45
75           _9 = discriminant(_7);           // scope 2 at $DIR/funky_arms.rs:24:12: 24:27
76           switchInt(move _9) -> [1_isize: bb6, otherwise: bb8]; // scope 2 at $DIR/funky_arms.rs:24:12: 24:27
77       }
78   
79       bb6: {
80           StorageLive(_10);                // scope 2 at $DIR/funky_arms.rs:24:17: 24:26
81           _10 = ((_7 as Some).0: usize);   // scope 2 at $DIR/funky_arms.rs:24:17: 24:26
82           StorageLive(_11);                // scope 2 at $DIR/funky_arms.rs:26:43: 26:46
83           _11 = &mut (*_1);                // scope 2 at $DIR/funky_arms.rs:26:43: 26:46
84           StorageLive(_12);                // scope 2 at $DIR/funky_arms.rs:26:48: 26:51
85           _12 = _2;                        // scope 2 at $DIR/funky_arms.rs:26:48: 26:51
86           StorageLive(_13);                // scope 2 at $DIR/funky_arms.rs:26:53: 26:57
87           _13 = _6;                        // scope 2 at $DIR/funky_arms.rs:26:53: 26:57
88           StorageLive(_14);                // scope 2 at $DIR/funky_arms.rs:26:59: 26:79
89           StorageLive(_15);                // scope 2 at $DIR/funky_arms.rs:26:59: 26:75
90           StorageLive(_16);                // scope 2 at $DIR/funky_arms.rs:26:59: 26:68
91           _16 = _10;                       // scope 2 at $DIR/funky_arms.rs:26:59: 26:68
92           _15 = move _16 as u32 (Misc);    // scope 2 at $DIR/funky_arms.rs:26:59: 26:75
93           StorageDead(_16);                // scope 2 at $DIR/funky_arms.rs:26:74: 26:75
94           _14 = Add(move _15, const 1_u32); // scope 2 at $DIR/funky_arms.rs:26:59: 26:79
95           StorageDead(_15);                // scope 2 at $DIR/funky_arms.rs:26:78: 26:79
96           StorageLive(_17);                // scope 2 at $DIR/funky_arms.rs:26:81: 26:86
97           _17 = _3;                        // scope 2 at $DIR/funky_arms.rs:26:81: 26:86
98           _0 = float_to_exponential_common_exact::<T>(move _11, move _12, move _13, move _14, move _17) -> bb7; // scope 2 at $DIR/funky_arms.rs:26:9: 26:87
99                                            // mir::Constant
100                                            // + span: $DIR/funky_arms.rs:26:9: 26:42
101                                            // + literal: Const { ty: for<'r, 's, 't0> fn(&'r mut std::fmt::Formatter<'s>, &'t0 T, core::num::flt2dec::Sign, u32, bool) -> std::result::Result<(), std::fmt::Error> {float_to_exponential_common_exact::<T>}, val: Value(Scalar(<ZST>)) }
102       }
103   
104       bb7: {
105           StorageDead(_17);                // scope 2 at $DIR/funky_arms.rs:26:86: 26:87
106           StorageDead(_14);                // scope 2 at $DIR/funky_arms.rs:26:86: 26:87
107           StorageDead(_13);                // scope 2 at $DIR/funky_arms.rs:26:86: 26:87
108           StorageDead(_12);                // scope 2 at $DIR/funky_arms.rs:26:86: 26:87
109           StorageDead(_11);                // scope 2 at $DIR/funky_arms.rs:26:86: 26:87
110           StorageDead(_10);                // scope 2 at $DIR/funky_arms.rs:27:5: 27:6
111           goto -> bb10;                    // scope 2 at $DIR/funky_arms.rs:24:5: 29:6
112       }
113   
114       bb8: {
115           StorageLive(_18);                // scope 2 at $DIR/funky_arms.rs:28:46: 28:49
116           _18 = &mut (*_1);                // scope 2 at $DIR/funky_arms.rs:28:46: 28:49
117           StorageLive(_19);                // scope 2 at $DIR/funky_arms.rs:28:51: 28:54
118           _19 = _2;                        // scope 2 at $DIR/funky_arms.rs:28:51: 28:54
119           StorageLive(_20);                // scope 2 at $DIR/funky_arms.rs:28:56: 28:60
120           _20 = _6;                        // scope 2 at $DIR/funky_arms.rs:28:56: 28:60
121           StorageLive(_21);                // scope 2 at $DIR/funky_arms.rs:28:62: 28:67
122           _21 = _3;                        // scope 2 at $DIR/funky_arms.rs:28:62: 28:67
123           _0 = float_to_exponential_common_shortest::<T>(move _18, move _19, move _20, move _21) -> bb9; // scope 2 at $DIR/funky_arms.rs:28:9: 28:68
124                                            // mir::Constant
125                                            // + span: $DIR/funky_arms.rs:28:9: 28:45
126                                            // + literal: Const { ty: for<'r, 's, 't0> fn(&'r mut std::fmt::Formatter<'s>, &'t0 T, core::num::flt2dec::Sign, bool) -> std::result::Result<(), std::fmt::Error> {float_to_exponential_common_shortest::<T>}, val: Value(Scalar(<ZST>)) }
127       }
128   
129       bb9: {
130           StorageDead(_21);                // scope 2 at $DIR/funky_arms.rs:28:67: 28:68
131           StorageDead(_20);                // scope 2 at $DIR/funky_arms.rs:28:67: 28:68
132           StorageDead(_19);                // scope 2 at $DIR/funky_arms.rs:28:67: 28:68
133           StorageDead(_18);                // scope 2 at $DIR/funky_arms.rs:28:67: 28:68
134           goto -> bb10;                    // scope 2 at $DIR/funky_arms.rs:24:5: 29:6
135       }
136   
137       bb10: {
138           StorageDead(_6);                 // scope 1 at $DIR/funky_arms.rs:30:1: 30:2
139           StorageDead(_4);                 // scope 0 at $DIR/funky_arms.rs:30:1: 30:2
140           StorageDead(_7);                 // scope 0 at $DIR/funky_arms.rs:30:1: 30:2
141           return;                          // scope 0 at $DIR/funky_arms.rs:30:2: 30:2
142       }
143   }
144