]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/simplify_arm.id.SimplifyBranchSame.diff
Auto merge of #83314 - Aaron1011:print-unstable-value, r=lcnr
[rust.git] / src / test / mir-opt / simplify_arm.id.SimplifyBranchSame.diff
1 - // MIR for `id` before SimplifyBranchSame
2 + // MIR for `id` after SimplifyBranchSame
3   
4   fn id(_1: Option<u8>) -> Option<u8> {
5       debug o => _1;                       // in scope 0 at $DIR/simplify-arm.rs:9:7: 9:8
6       let mut _0: std::option::Option<u8>; // return place in scope 0 at $DIR/simplify-arm.rs:9:25: 9:35
7       let mut _2: isize;                   // in scope 0 at $DIR/simplify-arm.rs:11:9: 11:16
8       let _3: u8;                          // in scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
9       let mut _4: u8;                      // in scope 0 at $DIR/simplify-arm.rs:11:25: 11:26
10       scope 1 {
11           debug v => ((_0 as Some).0: u8); // in scope 1 at $DIR/simplify-arm.rs:11:14: 11:15
12       }
13   
14       bb0: {
15           _2 = discriminant(_1);           // scope 0 at $DIR/simplify-arm.rs:11:9: 11:16
16 -         switchInt(move _2) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:11:9: 11:16
17 +         goto -> bb1;                     // scope 0 at $DIR/simplify-arm.rs:11:9: 11:16
18       }
19   
20       bb1: {
21 -         discriminant(_0) = 0;            // scope 0 at $DIR/simplify-arm.rs:12:17: 12:21
22 -         goto -> bb4;                     // scope 0 at $DIR/simplify-arm.rs:10:5: 13:6
23 -     }
24
25 -     bb2: {
26 -         unreachable;                     // scope 0 at $DIR/simplify-arm.rs:10:11: 10:12
27 -     }
28
29 -     bb3: {
30           _0 = move _1;                    // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
31 -         goto -> bb4;                     // scope 0 at $DIR/simplify-arm.rs:10:5: 13:6
32 +         goto -> bb2;                     // scope 0 at $DIR/simplify-arm.rs:10:5: 13:6
33       }
34   
35 -     bb4: {
36 +     bb2: {
37           return;                          // scope 0 at $DIR/simplify-arm.rs:14:2: 14:2
38       }
39   }
40