]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/simplify_cfg.main.SimplifyCfg-early-opt.diff
Rollup merge of #75837 - GuillaumeGomez:fix-font-color-help-button, r=Cldfire
[rust.git] / src / test / 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:5:11: 5:11
6       let mut _1: ();                      // in scope 0 at $DIR/simplify_cfg.rs:5:1: 11:2
7       let mut _2: bool;                    // in scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17
8       let mut _3: !;                       // in scope 0 at $DIR/simplify_cfg.rs:7:18: 9:10
9   
10       bb0: {
11 -         goto -> bb1;                     // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6
12 -     }
13
14 -     bb1: {
15           StorageLive(_2);                 // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17
16 -         _2 = bar() -> bb3;               // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17
17 +         _2 = bar() -> bb1;               // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17
18                                            // mir::Constant
19                                            // + span: $DIR/simplify_cfg.rs:7:12: 7:15
20                                            // + literal: Const { ty: fn() -> bool {bar}, val: Value(Scalar(<ZST>)) }
21       }
22   
23 -     bb2 (cleanup): {
24 -         resume;                          // scope 0 at $DIR/simplify_cfg.rs:5:1: 11:2
25 +     bb1: {
26 +         switchInt(_2) -> [false: bb2, otherwise: bb3]; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10
27       }
28   
29 -     bb3: {
30 -         nop;                             // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17
31 -         switchInt(_2) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10
32 -     }
33
34 -     bb4: {
35 -         goto -> bb6;                     // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10
36 -     }
37
38 -     bb5: {
39 +     bb2: {
40           _1 = const ();                   // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10
41           StorageDead(_2);                 // scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6
42           goto -> bb0;                     // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6
43       }
44   
45 -     bb6: {
46 +     bb3: {
47           _0 = const ();                   // scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18
48           StorageDead(_2);                 // scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6
49           return;                          // scope 0 at $DIR/simplify_cfg.rs:11:2: 11:2
50       }
51   }
52