]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/loop_test/rustc.main.SimplifyCfg-qualify-consts.after.mir
Rollup merge of #71627 - ldm0:autoderefarg, r=Dylan-DPC
[rust.git] / src / test / mir-opt / loop_test / rustc.main.SimplifyCfg-qualify-consts.after.mir
1 // MIR for `main` after SimplifyCfg-qualify-consts
2
3 fn main() -> () {
4     let mut _0: ();                      // return place in scope 0 at $DIR/loop_test.rs:6:11: 6:11
5     let _1: ();                          // in scope 0 at $DIR/loop_test.rs:10:5: 12:6
6     let mut _2: bool;                    // in scope 0 at $DIR/loop_test.rs:10:8: 10:12
7     let mut _3: !;                       // in scope 0 at $DIR/loop_test.rs:10:13: 12:6
8     let mut _4: !;                       // in scope 0 at $DIR/loop_test.rs:13:5: 16:6
9     let mut _5: ();                      // in scope 0 at $DIR/loop_test.rs:6:1: 17:2
10     let _6: i32;                         // in scope 0 at $DIR/loop_test.rs:14:13: 14:14
11     scope 1 {
12         debug x => _6;                   // in scope 1 at $DIR/loop_test.rs:14:13: 14:14
13     }
14
15     bb0: {
16         StorageLive(_1);                 // scope 0 at $DIR/loop_test.rs:10:5: 12:6
17         StorageLive(_2);                 // scope 0 at $DIR/loop_test.rs:10:8: 10:12
18         _2 = const true;                 // scope 0 at $DIR/loop_test.rs:10:8: 10:12
19                                          // ty::Const
20                                          // + ty: bool
21                                          // + val: Value(Scalar(0x01))
22                                          // mir::Constant
23                                          // + span: $DIR/loop_test.rs:10:8: 10:12
24                                          // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
25         FakeRead(ForMatchedPlace, _2);   // scope 0 at $DIR/loop_test.rs:10:8: 10:12
26         switchInt(_2) -> [false: bb3, otherwise: bb2]; // scope 0 at $DIR/loop_test.rs:10:5: 12:6
27     }
28
29     bb1 (cleanup): {
30         resume;                          // scope 0 at $DIR/loop_test.rs:6:1: 17:2
31     }
32
33     bb2: {
34         falseEdges -> [real: bb4, imaginary: bb3]; // scope 0 at $DIR/loop_test.rs:10:5: 12:6
35     }
36
37     bb3: {
38         _1 = const ();                   // scope 0 at $DIR/loop_test.rs:10:5: 12:6
39                                          // ty::Const
40                                          // + ty: ()
41                                          // + val: Value(Scalar(<ZST>))
42                                          // mir::Constant
43                                          // + span: $DIR/loop_test.rs:10:5: 12:6
44                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
45         StorageDead(_2);                 // scope 0 at $DIR/loop_test.rs:12:5: 12:6
46         StorageDead(_1);                 // scope 0 at $DIR/loop_test.rs:12:5: 12:6
47         StorageLive(_4);                 // scope 0 at $DIR/loop_test.rs:13:5: 16:6
48         goto -> bb5;                     // scope 0 at $DIR/loop_test.rs:13:5: 16:6
49     }
50
51     bb4: {
52         _0 = const ();                   // scope 0 at $DIR/loop_test.rs:11:9: 11:15
53                                          // ty::Const
54                                          // + ty: ()
55                                          // + val: Value(Scalar(<ZST>))
56                                          // mir::Constant
57                                          // + span: $DIR/loop_test.rs:11:9: 11:15
58                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
59         StorageDead(_2);                 // scope 0 at $DIR/loop_test.rs:12:5: 12:6
60         StorageDead(_1);                 // scope 0 at $DIR/loop_test.rs:12:5: 12:6
61         return;                          // scope 0 at $DIR/loop_test.rs:17:2: 17:2
62     }
63
64     bb5: {
65         falseUnwind -> [real: bb6, cleanup: bb1]; // scope 0 at $DIR/loop_test.rs:13:5: 16:6
66     }
67
68     bb6: {
69         StorageLive(_6);                 // scope 0 at $DIR/loop_test.rs:14:13: 14:14
70         _6 = const 1i32;                 // scope 0 at $DIR/loop_test.rs:14:17: 14:18
71                                          // ty::Const
72                                          // + ty: i32
73                                          // + val: Value(Scalar(0x00000001))
74                                          // mir::Constant
75                                          // + span: $DIR/loop_test.rs:14:17: 14:18
76                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
77         FakeRead(ForLet, _6);            // scope 0 at $DIR/loop_test.rs:14:13: 14:14
78         StorageDead(_6);                 // scope 0 at $DIR/loop_test.rs:16:5: 16:6
79         goto -> bb5;                     // scope 0 at $DIR/loop_test.rs:15:9: 15:17
80     }
81 }