]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/unreachable_asm.main.UnreachablePropagation.diff
Rollup merge of #88349 - spastorino:const-static-types-tait-test, r=oli-obk
[rust.git] / src / test / mir-opt / unreachable_asm.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_asm.rs:10:11: 10:11
6       let mut _1: std::option::Option<Empty>; // in scope 0 at $DIR/unreachable_asm.rs:11:23: 11:30
7       let mut _2: isize;                   // in scope 0 at $DIR/unreachable_asm.rs:11:12: 11:20
8       let _3: Empty;                       // in scope 0 at $DIR/unreachable_asm.rs:11:17: 11:19
9       let mut _4: i32;                     // in scope 0 at $DIR/unreachable_asm.rs:12:13: 12:19
10       let _5: ();                          // in scope 0 at $DIR/unreachable_asm.rs:14:9: 18:10
11       let mut _6: bool;                    // in scope 0 at $DIR/unreachable_asm.rs:14:12: 14:16
12       let _7: ();                          // in scope 0 at $DIR/unreachable_asm.rs:21:9: 21:37
13       let mut _8: !;                       // in scope 0 at $DIR/unreachable_asm.rs:22:9: 22:21
14       scope 1 {
15           debug _x => _3;                  // in scope 1 at $DIR/unreachable_asm.rs:11:17: 11:19
16       }
17       scope 2 {
18           debug _y => _4;                  // in scope 2 at $DIR/unreachable_asm.rs:12:13: 12:19
19           scope 3 {
20           }
21       }
22   
23       bb0: {
24           StorageLive(_1);                 // scope 0 at $DIR/unreachable_asm.rs:11:23: 11:30
25           _1 = empty() -> bb1;             // scope 0 at $DIR/unreachable_asm.rs:11:23: 11:30
26                                            // mir::Constant
27                                            // + span: $DIR/unreachable_asm.rs:11:23: 11:28
28                                            // + literal: Const { ty: fn() -> std::option::Option<Empty> {empty}, val: Value(Scalar(<ZST>)) }
29       }
30   
31       bb1: {
32           _2 = discriminant(_1);           // scope 0 at $DIR/unreachable_asm.rs:11:12: 11:20
33           switchInt(move _2) -> [1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/unreachable_asm.rs:11:12: 11:20
34       }
35   
36       bb2: {
37           _0 = const ();                   // scope 0 at $DIR/unreachable_asm.rs:23:6: 23:6
38           StorageDead(_3);                 // scope 0 at $DIR/unreachable_asm.rs:23:5: 23:6
39           StorageDead(_1);                 // scope 0 at $DIR/unreachable_asm.rs:24:1: 24:2
40           return;                          // scope 0 at $DIR/unreachable_asm.rs:24:2: 24:2
41       }
42   
43       bb3: {
44           StorageLive(_3);                 // scope 0 at $DIR/unreachable_asm.rs:11:17: 11:19
45           _3 = move ((_1 as Some).0: Empty); // scope 0 at $DIR/unreachable_asm.rs:11:17: 11:19
46           StorageLive(_4);                 // scope 0 at $DIR/unreachable_asm.rs:12:13: 12:19
47           StorageLive(_5);                 // scope 2 at $DIR/unreachable_asm.rs:14:9: 18:10
48           StorageLive(_6);                 // scope 2 at $DIR/unreachable_asm.rs:14:12: 14:16
49           _6 = const true;                 // scope 2 at $DIR/unreachable_asm.rs:14:12: 14:16
50           switchInt(move _6) -> [false: bb5, otherwise: bb4]; // scope 2 at $DIR/unreachable_asm.rs:14:9: 18:10
51       }
52   
53       bb4: {
54           _4 = const 21_i32;               // scope 2 at $DIR/unreachable_asm.rs:15:13: 15:20
55           _5 = const ();                   // scope 2 at $DIR/unreachable_asm.rs:14:17: 16:10
56           goto -> bb6;                     // scope 2 at $DIR/unreachable_asm.rs:14:9: 18:10
57       }
58   
59       bb5: {
60           _4 = const 42_i32;               // scope 2 at $DIR/unreachable_asm.rs:17:13: 17:20
61           _5 = const ();                   // scope 2 at $DIR/unreachable_asm.rs:16:16: 18:10
62           goto -> bb6;                     // scope 2 at $DIR/unreachable_asm.rs:14:9: 18:10
63       }
64   
65       bb6: {
66           StorageDead(_6);                 // scope 2 at $DIR/unreachable_asm.rs:18:9: 18:10
67           StorageDead(_5);                 // scope 2 at $DIR/unreachable_asm.rs:18:9: 18:10
68           StorageLive(_7);                 // scope 2 at $DIR/unreachable_asm.rs:21:9: 21:37
69           llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []); // scope 3 at $DIR/unreachable_asm.rs:21:18: 21:35
70           _7 = const ();                   // scope 3 at $DIR/unreachable_asm.rs:21:9: 21:37
71           StorageDead(_7);                 // scope 2 at $DIR/unreachable_asm.rs:21:36: 21:37
72           StorageLive(_8);                 // scope 2 at $DIR/unreachable_asm.rs:22:9: 22:21
73           unreachable;                     // scope 2 at $DIR/unreachable_asm.rs:22:15: 22:17
74       }
75   }
76