]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/simplify_if.main.SimplifyBranches-after-const-prop.diff
Auto merge of #83314 - Aaron1011:print-unstable-value, r=lcnr
[rust.git] / src / test / mir-opt / simplify_if.main.SimplifyBranches-after-const-prop.diff
1 - // MIR for `main` before SimplifyBranches-after-const-prop
2 + // MIR for `main` after SimplifyBranches-after-const-prop
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/simplify_if.rs:5:11: 5:11
6       let mut _1: bool;                    // in scope 0 at $DIR/simplify_if.rs:6:8: 6:13
7       let _2: ();                          // in scope 0 at $DIR/simplify_if.rs:7:9: 7:15
8   
9       bb0: {
10           StorageLive(_1);                 // scope 0 at $DIR/simplify_if.rs:6:8: 6:13
11           _1 = const false;                // scope 0 at $DIR/simplify_if.rs:6:8: 6:13
12 -         switchInt(const false) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/simplify_if.rs:6:5: 8:6
13 +         goto -> bb2;                     // scope 0 at $DIR/simplify_if.rs:6:5: 8:6
14       }
15   
16       bb1: {
17           StorageLive(_2);                 // scope 0 at $DIR/simplify_if.rs:7:9: 7:15
18           _2 = noop() -> bb3;              // scope 0 at $DIR/simplify_if.rs:7:9: 7:15
19                                            // mir::Constant
20                                            // + span: $DIR/simplify_if.rs:7:9: 7:13
21                                            // + literal: Const { ty: fn() {noop}, val: Value(Scalar(<ZST>)) }
22       }
23   
24       bb2: {
25           _0 = const ();                   // scope 0 at $DIR/simplify_if.rs:8:6: 8:6
26           goto -> bb4;                     // scope 0 at $DIR/simplify_if.rs:6:5: 8:6
27       }
28   
29       bb3: {
30           StorageDead(_2);                 // scope 0 at $DIR/simplify_if.rs:7:15: 7:16
31           _0 = const ();                   // scope 0 at $DIR/simplify_if.rs:6:14: 8:6
32           goto -> bb4;                     // scope 0 at $DIR/simplify_if.rs:6:5: 8:6
33       }
34   
35       bb4: {
36           StorageDead(_1);                 // scope 0 at $DIR/simplify_if.rs:8:5: 8:6
37           return;                          // scope 0 at $DIR/simplify_if.rs:9:2: 9:2
38       }
39   }
40