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