]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/derefer_terminator_test.main.Derefer.diff
003803fbd5ca94304d98fd9a740bfbd2cf311684
[rust.git] / src / test / mir-opt / derefer_terminator_test.main.Derefer.diff
1 - // MIR for `main` before Derefer
2 + // MIR for `main` after Derefer
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/derefer_terminator_test.rs:4:11: 4:11
6       let _1: bool;                        // in scope 0 at $DIR/derefer_terminator_test.rs:5:9: 5:10
7       let _3: ();                          // in scope 0 at $DIR/derefer_terminator_test.rs:7:5: 10:6
8       let mut _4: &&&&bool;                // in scope 0 at $DIR/derefer_terminator_test.rs:7:15: 7:22
9       let _5: &&&bool;                     // in scope 0 at $DIR/derefer_terminator_test.rs:7:17: 7:21
10       let _6: &&bool;                      // in scope 0 at $DIR/derefer_terminator_test.rs:7:18: 7:21
11       let _7: &bool;                       // in scope 0 at $DIR/derefer_terminator_test.rs:7:19: 7:21
12 +     let mut _10: &&&bool;                // in scope 0 at $DIR/derefer_terminator_test.rs:7:15: 7:22
13 +     let mut _11: &&bool;                 // in scope 0 at $DIR/derefer_terminator_test.rs:7:15: 7:22
14 +     let mut _12: &bool;                  // in scope 0 at $DIR/derefer_terminator_test.rs:7:15: 7:22
15       scope 1 {
16           debug b => _1;                   // in scope 1 at $DIR/derefer_terminator_test.rs:5:9: 5:10
17           let _2: bool;                    // in scope 1 at $DIR/derefer_terminator_test.rs:6:9: 6:10
18           scope 2 {
19               debug d => _2;               // in scope 2 at $DIR/derefer_terminator_test.rs:6:9: 6:10
20               let _8: i32;                 // in scope 2 at $DIR/derefer_terminator_test.rs:8:22: 8:23
21               let _9: i32;                 // in scope 2 at $DIR/derefer_terminator_test.rs:11:9: 11:10
22               scope 3 {
23                   debug x => _8;           // in scope 3 at $DIR/derefer_terminator_test.rs:8:22: 8:23
24               }
25               scope 4 {
26                   debug y => _9;           // in scope 4 at $DIR/derefer_terminator_test.rs:11:9: 11:10
27               }
28           }
29       }
30   
31       bb0: {
32           StorageLive(_1);                 // scope 0 at $DIR/derefer_terminator_test.rs:5:9: 5:10
33           _1 = foo() -> bb1;               // scope 0 at $DIR/derefer_terminator_test.rs:5:13: 5:18
34                                            // mir::Constant
35                                            // + span: $DIR/derefer_terminator_test.rs:5:13: 5:16
36                                            // + literal: Const { ty: fn() -> bool {foo}, val: Value(<ZST>) }
37       }
38   
39       bb1: {
40           StorageLive(_2);                 // scope 1 at $DIR/derefer_terminator_test.rs:6:9: 6:10
41           _2 = foo() -> bb2;               // scope 1 at $DIR/derefer_terminator_test.rs:6:13: 6:18
42                                            // mir::Constant
43                                            // + span: $DIR/derefer_terminator_test.rs:6:13: 6:16
44                                            // + literal: Const { ty: fn() -> bool {foo}, val: Value(<ZST>) }
45       }
46   
47       bb2: {
48           StorageLive(_3);                 // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 10:6
49           StorageLive(_4);                 // scope 2 at $DIR/derefer_terminator_test.rs:7:15: 7:22
50           StorageLive(_5);                 // scope 2 at $DIR/derefer_terminator_test.rs:7:17: 7:21
51           StorageLive(_6);                 // scope 2 at $DIR/derefer_terminator_test.rs:7:18: 7:21
52           StorageLive(_7);                 // scope 2 at $DIR/derefer_terminator_test.rs:7:19: 7:21
53           _7 = &_1;                        // scope 2 at $DIR/derefer_terminator_test.rs:7:19: 7:21
54           _6 = &_7;                        // scope 2 at $DIR/derefer_terminator_test.rs:7:18: 7:21
55           _5 = &_6;                        // scope 2 at $DIR/derefer_terminator_test.rs:7:17: 7:21
56           _4 = &_5;                        // scope 2 at $DIR/derefer_terminator_test.rs:7:15: 7:22
57 -         switchInt((*(*(*(*_4))))) -> [false: bb3, otherwise: bb4]; // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
58 +         StorageLive(_10);                // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
59 +         _10 = deref_copy (*_4);          // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
60 +         StorageLive(_11);                // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
61 +         _11 = deref_copy (*_10);         // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
62 +         StorageDead(_10);                // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
63 +         StorageLive(_12);                // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
64 +         _12 = deref_copy (*_11);         // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
65 +         StorageDead(_11);                // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
66 +         switchInt((*_12)) -> [false: bb3, otherwise: bb4]; // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
67       }
68   
69       bb3: {
70 +         StorageDead(_12);                // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
71           _3 = const ();                   // scope 2 at $DIR/derefer_terminator_test.rs:9:18: 9:20
72           goto -> bb5;                     // scope 2 at $DIR/derefer_terminator_test.rs:9:18: 9:20
73       }
74   
75       bb4: {
76 +         StorageDead(_12);                // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
77           StorageLive(_8);                 // scope 2 at $DIR/derefer_terminator_test.rs:8:22: 8:23
78           _8 = const 5_i32;                // scope 2 at $DIR/derefer_terminator_test.rs:8:26: 8:27
79           _3 = const ();                   // scope 2 at $DIR/derefer_terminator_test.rs:8:17: 8:29
80           StorageDead(_8);                 // scope 2 at $DIR/derefer_terminator_test.rs:8:28: 8:29
81           goto -> bb5;                     // scope 2 at $DIR/derefer_terminator_test.rs:8:28: 8:29
82       }
83   
84       bb5: {
85           StorageDead(_7);                 // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
86           StorageDead(_6);                 // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
87           StorageDead(_5);                 // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
88           StorageDead(_4);                 // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
89           StorageDead(_3);                 // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
90           StorageLive(_9);                 // scope 2 at $DIR/derefer_terminator_test.rs:11:9: 11:10
91           _9 = const 42_i32;               // scope 2 at $DIR/derefer_terminator_test.rs:11:13: 11:15
92           _0 = const ();                   // scope 0 at $DIR/derefer_terminator_test.rs:4:11: 12:2
93           StorageDead(_9);                 // scope 2 at $DIR/derefer_terminator_test.rs:12:1: 12:2
94           StorageDead(_2);                 // scope 1 at $DIR/derefer_terminator_test.rs:12:1: 12:2
95           StorageDead(_1);                 // scope 0 at $DIR/derefer_terminator_test.rs:12:1: 12:2
96           return;                          // scope 0 at $DIR/derefer_terminator_test.rs:12:2: 12:2
97 +     }
98
99 +     bb6 (cleanup): {
100 +         resume;                          // scope 0 at $DIR/derefer_terminator_test.rs:4:1: 12:2
101       }
102   }
103