]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/unreachable_diverging.main.UnreachablePropagation.diff
update mir diffs
[rust.git] / src / test / mir-opt / unreachable_diverging.main.UnreachablePropagation.diff
1 - // MIR for `main` before UnreachablePropagation
2 + // MIR for `main` after UnreachablePropagation
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/unreachable_diverging.rs:12:11: 12:11
6       let _1: bool;                        // in scope 0 at $DIR/unreachable_diverging.rs:13:9: 13:10
7       let mut _2: std::option::Option<Empty>; // in scope 0 at $DIR/unreachable_diverging.rs:14:25: 14:32
8       let mut _3: isize;                   // in scope 0 at $DIR/unreachable_diverging.rs:14:12: 14:22
9       let _5: ();                          // in scope 0 at $DIR/unreachable_diverging.rs:15:9: 17:10
10       let mut _6: bool;                    // in scope 0 at $DIR/unreachable_diverging.rs:15:12: 15:13
11       let mut _7: !;                       // in scope 0 at $DIR/unreachable_diverging.rs:18:9: 18:22
12       scope 1 {
13           debug x => _1;                   // in scope 1 at $DIR/unreachable_diverging.rs:13:9: 13:10
14           let _4: Empty;                   // in scope 1 at $DIR/unreachable_diverging.rs:14:17: 14:21
15           scope 2 {
16               debug bomb => _4;            // in scope 2 at $DIR/unreachable_diverging.rs:14:17: 14:21
17           }
18       }
19   
20       bb0: {
21           StorageLive(_1);                 // scope 0 at $DIR/unreachable_diverging.rs:13:9: 13:10
22           _1 = const true;                 // scope 0 at $DIR/unreachable_diverging.rs:13:13: 13:17
23           StorageLive(_2);                 // scope 1 at $DIR/unreachable_diverging.rs:14:25: 14:32
24           _2 = empty() -> bb1;             // scope 1 at $DIR/unreachable_diverging.rs:14:25: 14:32
25                                            // mir::Constant
26                                            // + span: $DIR/unreachable_diverging.rs:14:25: 14:30
27                                            // + literal: Const { ty: fn() -> std::option::Option<Empty> {empty}, val: Value(Scalar(<ZST>)) }
28       }
29   
30       bb1: {
31           _3 = discriminant(_2);           // scope 1 at $DIR/unreachable_diverging.rs:14:12: 14:22
32           switchInt(move _3) -> [1_isize: bb3, otherwise: bb2]; // scope 1 at $DIR/unreachable_diverging.rs:14:12: 14:22
33       }
34   
35       bb2: {
36           _0 = const ();                   // scope 1 at $DIR/unreachable_diverging.rs:19:6: 19:6
37           StorageDead(_4);                 // scope 1 at $DIR/unreachable_diverging.rs:19:5: 19:6
38           StorageDead(_1);                 // scope 0 at $DIR/unreachable_diverging.rs:20:1: 20:2
39           StorageDead(_2);                 // scope 0 at $DIR/unreachable_diverging.rs:20:1: 20:2
40           return;                          // scope 0 at $DIR/unreachable_diverging.rs:20:2: 20:2
41       }
42   
43       bb3: {
44           StorageLive(_4);                 // scope 1 at $DIR/unreachable_diverging.rs:14:17: 14:21
45           _4 = move ((_2 as Some).0: Empty); // scope 1 at $DIR/unreachable_diverging.rs:14:17: 14:21
46           StorageLive(_5);                 // scope 1 at $DIR/unreachable_diverging.rs:15:9: 17:10
47           StorageLive(_6);                 // scope 1 at $DIR/unreachable_diverging.rs:15:12: 15:13
48           _6 = _1;                         // scope 1 at $DIR/unreachable_diverging.rs:15:12: 15:13
49 -         switchInt(move _6) -> [false: bb5, otherwise: bb4]; // scope 1 at $DIR/unreachable_diverging.rs:15:9: 17:10
50 +         goto -> bb4;                     // scope 1 at $DIR/unreachable_diverging.rs:15:9: 17:10
51       }
52   
53       bb4: {
54 -         _5 = loop_forever() -> bb6;      // scope 1 at $DIR/unreachable_diverging.rs:16:13: 16:27
55 +         _5 = loop_forever() -> bb5;      // scope 1 at $DIR/unreachable_diverging.rs:16:13: 16:27
56                                            // mir::Constant
57                                            // + span: $DIR/unreachable_diverging.rs:16:13: 16:25
58                                            // + literal: Const { ty: fn() {loop_forever}, val: Value(Scalar(<ZST>)) }
59       }
60   
61       bb5: {
62 -         _5 = const ();                   // scope 1 at $DIR/unreachable_diverging.rs:17:10: 17:10
63 -         goto -> bb6;                     // scope 1 at $DIR/unreachable_diverging.rs:15:9: 17:10
64 -     }
65
66 -     bb6: {
67           StorageDead(_6);                 // scope 1 at $DIR/unreachable_diverging.rs:17:9: 17:10
68           StorageDead(_5);                 // scope 1 at $DIR/unreachable_diverging.rs:17:9: 17:10
69           StorageLive(_7);                 // scope 1 at $DIR/unreachable_diverging.rs:18:9: 18:22
70           unreachable;                     // scope 1 at $DIR/unreachable_diverging.rs:18:15: 18:19
71       }
72   }
73