]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/simplify_cfg.main.SimplifyCfg-initial.diff
Rollup merge of #107719 - WaffleLapkin:de-arena-allocates-you-UwU, r=cjgillot
[rust.git] / tests / mir-opt / simplify_cfg.main.SimplifyCfg-initial.diff
1 - // MIR for `main` before SimplifyCfg-initial
2 + // MIR for `main` after SimplifyCfg-initial
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/simplify_cfg.rs:+0:11: +0:11
6       let mut _1: ();                      // in scope 0 at $DIR/simplify_cfg.rs:+0:1: +6:2
7       let mut _2: bool;                    // in scope 0 at $DIR/simplify_cfg.rs:+2:12: +2:17
8       let mut _3: !;                       // in scope 0 at $DIR/simplify_cfg.rs:+2:18: +4:10
9   
10       bb0: {
11           goto -> bb1;                     // scope 0 at $DIR/simplify_cfg.rs:+1:5: +5:6
12       }
13   
14       bb1: {
15 -         falseUnwind -> [real: bb2, cleanup: bb11]; // scope 0 at $DIR/simplify_cfg.rs:+1:5: +5:6
16 +         falseUnwind -> [real: bb2, cleanup: bb6]; // scope 0 at $DIR/simplify_cfg.rs:+1:5: +5:6
17       }
18   
19       bb2: {
20           StorageLive(_2);                 // scope 0 at $DIR/simplify_cfg.rs:+2:12: +2:17
21 -         _2 = bar() -> [return: bb3, unwind: bb11]; // scope 0 at $DIR/simplify_cfg.rs:+2:12: +2:17
22 +         _2 = bar() -> [return: bb3, unwind: bb6]; // scope 0 at $DIR/simplify_cfg.rs:+2:12: +2:17
23                                            // mir::Constant
24                                            // + span: $DIR/simplify_cfg.rs:9:12: 9:15
25                                            // + literal: Const { ty: fn() -> bool {bar}, val: Value(<ZST>) }
26       }
27   
28       bb3: {
29           switchInt(move _2) -> [0: bb5, otherwise: bb4]; // scope 0 at $DIR/simplify_cfg.rs:+2:12: +2:17
30       }
31   
32       bb4: {
33           _0 = const ();                   // scope 0 at $DIR/simplify_cfg.rs:+3:13: +3:18
34 -         goto -> bb10;                    // scope 0 at $DIR/simplify_cfg.rs:+3:13: +3:18
35 +         StorageDead(_2);                 // scope 0 at $DIR/simplify_cfg.rs:+4:9: +4:10
36 +         return;                          // scope 0 at $DIR/simplify_cfg.rs:+6:2: +6:2
37       }
38   
39       bb5: {
40 -         goto -> bb8;                     // scope 0 at $DIR/simplify_cfg.rs:+2:12: +2:17
41 -     }
42
43 -     bb6: {
44 -         unreachable;                     // scope 0 at $DIR/simplify_cfg.rs:+2:18: +4:10
45 -     }
46
47 -     bb7: {
48 -         goto -> bb9;                     // scope 0 at $DIR/simplify_cfg.rs:+2:9: +4:10
49 -     }
50
51 -     bb8: {
52           _1 = const ();                   // scope 0 at $DIR/simplify_cfg.rs:+4:10: +4:10
53 -         goto -> bb9;                     // scope 0 at $DIR/simplify_cfg.rs:+2:9: +4:10
54 -     }
55
56 -     bb9: {
57           StorageDead(_2);                 // scope 0 at $DIR/simplify_cfg.rs:+4:9: +4:10
58           goto -> bb1;                     // scope 0 at $DIR/simplify_cfg.rs:+1:5: +5:6
59       }
60   
61 -     bb10: {
62 -         StorageDead(_2);                 // scope 0 at $DIR/simplify_cfg.rs:+4:9: +4:10
63 -         return;                          // scope 0 at $DIR/simplify_cfg.rs:+6:2: +6:2
64 -     }
65
66 -     bb11 (cleanup): {
67 +     bb6 (cleanup): {
68           resume;                          // scope 0 at $DIR/simplify_cfg.rs:+0:1: +6:2
69       }
70   }
71