]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/loop_test.main.SimplifyCfg-promote-consts.after.mir
Actually fix
[rust.git] / src / test / mir-opt / loop_test.main.SimplifyCfg-promote-consts.after.mir
1 // MIR for `main` after SimplifyCfg-promote-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     }
13     scope 2 {
14         debug x => _6;                   // in scope 2 at $DIR/loop_test.rs:14:13: 14:14
15     }
16
17     bb0: {
18         StorageLive(_1);                 // scope 0 at $DIR/loop_test.rs:10:5: 12:6
19         StorageLive(_2);                 // scope 1 at $DIR/loop_test.rs:10:8: 10:12
20         _2 = const true;                 // scope 1 at $DIR/loop_test.rs:10:8: 10:12
21         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 1 at $DIR/loop_test.rs:10:8: 10:12
22     }
23
24     bb1: {
25         _0 = const ();                   // scope 1 at $DIR/loop_test.rs:11:9: 11:15
26         StorageDead(_2);                 // scope 0 at $DIR/loop_test.rs:12:5: 12:6
27         StorageDead(_1);                 // scope 0 at $DIR/loop_test.rs:12:5: 12:6
28         return;                          // scope 0 at $DIR/loop_test.rs:17:2: 17:2
29     }
30
31     bb2: {
32         _1 = const ();                   // scope 0 at $DIR/loop_test.rs:12:6: 12:6
33         StorageDead(_2);                 // scope 0 at $DIR/loop_test.rs:12:5: 12:6
34         StorageDead(_1);                 // scope 0 at $DIR/loop_test.rs:12:5: 12:6
35         StorageLive(_4);                 // scope 0 at $DIR/loop_test.rs:13:5: 16:6
36         goto -> bb3;                     // scope 0 at $DIR/loop_test.rs:13:5: 16:6
37     }
38
39     bb3: {
40         falseUnwind -> [real: bb4, cleanup: bb5]; // scope 0 at $DIR/loop_test.rs:13:5: 16:6
41     }
42
43     bb4: {
44         StorageLive(_6);                 // scope 0 at $DIR/loop_test.rs:14:13: 14:14
45         _6 = const 1_i32;                // scope 0 at $DIR/loop_test.rs:14:17: 14:18
46         FakeRead(ForLet(None), _6);      // scope 0 at $DIR/loop_test.rs:14:13: 14:14
47         StorageDead(_6);                 // scope 0 at $DIR/loop_test.rs:16:5: 16:6
48         goto -> bb3;                     // scope 0 at no-location
49     }
50
51     bb5 (cleanup): {
52         resume;                          // scope 0 at $DIR/loop_test.rs:6:1: 17:2
53     }
54 }