]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/simplify-locals-removes-unused-consts/rustc.main.SimplifyLocals.diff
Show the values and computation that would overflow a const evaluation or propagation
[rust.git] / src / test / mir-opt / simplify-locals-removes-unused-consts / rustc.main.SimplifyLocals.diff
1 - // MIR for `main` before SimplifyLocals
2 + // MIR for `main` after SimplifyLocals
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:12:11: 12:11
6 -     let mut _1: ((), ());                // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
7 -     let mut _2: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
8 -     let mut _3: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
9 -     let _4: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
10 -     let mut _5: ((), ());                // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
11 -     let mut _6: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
12 -     let mut _7: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
13 -     let _8: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
14 -     let mut _9: u8;                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:34
15 -     let mut _10: u8;                     // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30
16 -     let mut _11: Temp;                   // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
17 +     let _1: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
18 +     let _2: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
19       scope 1 {
20       }
21   
22       bb0: {
23 -         StorageLive(_1);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
24 -         StorageLive(_2);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
25 -         _2 = const ();                   // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
26 +         StorageLive(_1);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
27 +         _1 = const use_zst(const ((), ())) -> bb1; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
28                                            // ty::Const
29 -                                          // + ty: ()
30 -                                          // + val: Value(Scalar(<ZST>))
31 -                                          // mir::Constant
32 -                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:21: 13:23
33 -                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
34 -         StorageLive(_3);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
35 -         _3 = const ();                   // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
36 -                                          // ty::Const
37 -                                          // + ty: ()
38 -                                          // + val: Value(Scalar(<ZST>))
39 -                                          // mir::Constant
40 -                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:25: 13:27
41 -                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
42 -         _1 = const ((), ());             // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
43 -                                          // ty::Const
44 -                                          // + ty: ((), ())
45 -                                          // + val: Value(Scalar(<ZST>))
46 -                                          // mir::Constant
47 -                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:13:20: 13:28
48 -                                          // + literal: Const { ty: ((), ()), val: Value(Scalar(<ZST>)) }
49 -         StorageDead(_3);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28
50 -         StorageDead(_2);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:27: 13:28
51 -         StorageDead(_1);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:13:28: 13:29
52 -         StorageLive(_4);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
53 -         StorageLive(_5);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
54 -         StorageLive(_6);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
55 -         _6 = const ();                   // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
56 -                                          // ty::Const
57 -                                          // + ty: ()
58 -                                          // + val: Value(Scalar(<ZST>))
59 -                                          // mir::Constant
60 -                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:14: 14:16
61 -                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
62 -         StorageLive(_7);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
63 -         _7 = const ();                   // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
64 -                                          // ty::Const
65 -                                          // + ty: ()
66 -                                          // + val: Value(Scalar(<ZST>))
67 -                                          // mir::Constant
68 -                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:18: 14:20
69 -                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
70 -         _5 = const ((), ());             // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
71 -                                          // ty::Const
72 -                                          // + ty: ((), ())
73 -                                          // + val: Value(Scalar(<ZST>))
74 -                                          // mir::Constant
75 -                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:13: 14:21
76 -                                          // + literal: Const { ty: ((), ()), val: Value(Scalar(<ZST>)) }
77 -         StorageDead(_7);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21
78 -         StorageDead(_6);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:20: 14:21
79 -         _4 = const use_zst(const ((), ())) -> bb1; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
80 -                                          // ty::Const
81                                            // + ty: fn(((), ())) {use_zst}
82                                            // + val: Value(Scalar(<ZST>))
83                                            // mir::Constant
84                                            // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:12
85                                            // + literal: Const { ty: fn(((), ())) {use_zst}, val: Value(Scalar(<ZST>)) }
86                                            // ty::Const
87                                            // + ty: ((), ())
88                                            // + val: Value(Scalar(<ZST>))
89                                            // mir::Constant
90                                            // + span: $DIR/simplify-locals-removes-unused-consts.rs:14:5: 14:22
91                                            // + literal: Const { ty: ((), ()), val: Value(Scalar(<ZST>)) }
92       }
93   
94       bb1: {
95 -         StorageDead(_5);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:21: 14:22
96 -         StorageDead(_4);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:22: 14:23
97 -         StorageLive(_8);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
98 -         StorageLive(_9);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:34
99 -         StorageLive(_10);                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30
100 -         StorageLive(_11);                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
101 -         _11 = const Temp { x: 40_u8 };   // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
102 +         StorageDead(_1);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:14:22: 14:23
103 +         StorageLive(_2);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
104 +         _2 = const use_u8(const 42_u8) -> bb2; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
105                                            // ty::Const
106 -                                          // + ty: Temp
107 -                                          // + val: Value(Scalar(0x28))
108 -                                          // mir::Constant
109 -                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:28
110 -                                          // + literal: Const { ty: Temp, val: Value(Scalar(0x28)) }
111 -         _10 = const 40_u8;               // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30
112 -                                          // ty::Const
113 -                                          // + ty: u8
114 -                                          // + val: Value(Scalar(0x28))
115 -                                          // mir::Constant
116 -                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:30
117 -                                          // + literal: Const { ty: u8, val: Value(Scalar(0x28)) }
118 -         _9 = const 42_u8;                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:34
119 -                                          // ty::Const
120 -                                          // + ty: u8
121 -                                          // + val: Value(Scalar(0x2a))
122 -                                          // mir::Constant
123 -                                          // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:12: 16:34
124 -                                          // + literal: Const { ty: u8, val: Value(Scalar(0x2a)) }
125 -         StorageDead(_10);                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:33: 16:34
126 -         _8 = const use_u8(const 42_u8) -> bb2; // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
127 -                                          // ty::Const
128                                            // + ty: fn(u8) {use_u8}
129                                            // + val: Value(Scalar(<ZST>))
130                                            // mir::Constant
131                                            // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:11
132                                            // + literal: Const { ty: fn(u8) {use_u8}, val: Value(Scalar(<ZST>)) }
133                                            // ty::Const
134                                            // + ty: u8
135                                            // + val: Value(Scalar(0x2a))
136                                            // mir::Constant
137                                            // + span: $DIR/simplify-locals-removes-unused-consts.rs:16:5: 16:35
138                                            // + literal: Const { ty: u8, val: Value(Scalar(0x2a)) }
139       }
140   
141       bb2: {
142 -         StorageDead(_9);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:34: 16:35
143 -         StorageDead(_11);                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
144 -         StorageDead(_8);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
145 +         StorageDead(_2);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
146           _0 = const ();                   // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2
147                                            // ty::Const
148                                            // + ty: ()
149                                            // + val: Value(Scalar(<ZST>))
150                                            // mir::Constant
151                                            // + span: $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2
152                                            // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
153           return;                          // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:17:2: 17:2
154       }
155   }
156