]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/simplify_cfg.main.SimplifyCfg-early-opt.diff
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / mir-opt / simplify_cfg.main.SimplifyCfg-early-opt.diff
1 - // MIR for `main` before SimplifyCfg-early-opt
2 + // MIR for `main` after SimplifyCfg-early-opt
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 -         goto -> bb2;                     // scope 0 at $DIR/simplify_cfg.rs:+1:5: +5:6
16 -     }
17
18 -     bb2: {
19           StorageLive(_2);                 // scope 0 at $DIR/simplify_cfg.rs:+2:12: +2:17
20 -         _2 = bar() -> [return: bb3, unwind: bb6]; // scope 0 at $DIR/simplify_cfg.rs:+2:12: +2:17
21 +         _2 = bar() -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/simplify_cfg.rs:+2:12: +2:17
22                                            // mir::Constant
23                                            // + span: $DIR/simplify_cfg.rs:9:12: 9:15
24                                            // + literal: Const { ty: fn() -> bool {bar}, val: Value(<ZST>) }
25       }
26   
27 -     bb3: {
28 -         switchInt(move _2) -> [0: bb5, otherwise: bb4]; // scope 0 at $DIR/simplify_cfg.rs:+2:12: +2:17
29 +     bb2: {
30 +         switchInt(move _2) -> [0: bb4, otherwise: bb3]; // scope 0 at $DIR/simplify_cfg.rs:+2:12: +2:17
31       }
32   
33 -     bb4: {
34 +     bb3: {
35           _0 = const ();                   // scope 0 at $DIR/simplify_cfg.rs:+3:13: +3:18
36           StorageDead(_2);                 // scope 0 at $DIR/simplify_cfg.rs:+4:9: +4:10
37           return;                          // scope 0 at $DIR/simplify_cfg.rs:+6:2: +6:2
38       }
39   
40 -     bb5: {
41 +     bb4: {
42           _1 = const ();                   // scope 0 at $DIR/simplify_cfg.rs:+4:10: +4:10
43           StorageDead(_2);                 // scope 0 at $DIR/simplify_cfg.rs:+4:9: +4:10
44           goto -> bb1;                     // scope 0 at $DIR/simplify_cfg.rs:+1:5: +5:6
45       }
46   
47 -     bb6 (cleanup): {
48 +     bb5 (cleanup): {
49           resume;                          // scope 0 at $DIR/simplify_cfg.rs:+0:1: +6:2
50       }
51   }
52