summary refs log tree commit diff
path: root/src/test/mir-opt/simplify-arm-identity/rustc.main.SimplifyArmIdentity.diff
blob: b2517cb7012b488869e7f3404f87fd9046292f57 (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
- // MIR for `main` before SimplifyArmIdentity
+ // MIR for `main` after SimplifyArmIdentity
  
  fn main() -> () {
      let mut _0: ();                      // return place in scope 0 at $DIR/simplify-arm-identity.rs:16:11: 16:11
      let _1: Src as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 0 at $DIR/simplify-arm-identity.rs:17:9: 17:10
      let mut _2: Dst;                     // in scope 0 at $DIR/simplify-arm-identity.rs:18:18: 21:6
      let mut _3: isize;                   // in scope 0 at $DIR/simplify-arm-identity.rs:19:9: 19:20
      let mut _5: u8;                      // in scope 0 at $DIR/simplify-arm-identity.rs:19:33: 19:34
      scope 1 {
          debug e => _1;                   // in scope 1 at $DIR/simplify-arm-identity.rs:17:9: 17:10
          let _4: u8;                      // in scope 1 at $DIR/simplify-arm-identity.rs:19:18: 19:19
          scope 2 {
          }
          scope 3 {
              debug x => _4;               // in scope 3 at $DIR/simplify-arm-identity.rs:19:18: 19:19
          }
      }
  
      bb0: {
          StorageLive(_1);                 // scope 0 at $DIR/simplify-arm-identity.rs:17:9: 17:10
          ((_1 as Foo).0: u8) = const 0u8; // scope 0 at $DIR/simplify-arm-identity.rs:17:18: 17:29
                                           // ty::Const
                                           // + ty: u8
                                           // + val: Value(Scalar(0x00))
                                           // mir::Constant
                                           // + span: $DIR/simplify-arm-identity.rs:17:27: 17:28
                                           // + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
          discriminant(_1) = 0;            // scope 0 at $DIR/simplify-arm-identity.rs:17:18: 17:29
          StorageLive(_2);                 // scope 1 at $DIR/simplify-arm-identity.rs:18:18: 21:6
          _3 = discriminant(_1);           // scope 1 at $DIR/simplify-arm-identity.rs:19:9: 19:20
          switchInt(move _3) -> [0isize: bb3, 1isize: bb1, otherwise: bb2]; // scope 1 at $DIR/simplify-arm-identity.rs:19:9: 19:20
      }
  
      bb1: {
          ((_2 as Foo).0: u8) = const 0u8; // scope 1 at $DIR/simplify-arm-identity.rs:20:21: 20:32
                                           // ty::Const
                                           // + ty: u8
                                           // + val: Value(Scalar(0x00))
                                           // mir::Constant
                                           // + span: $DIR/simplify-arm-identity.rs:20:30: 20:31
                                           // + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
          discriminant(_2) = 0;            // scope 1 at $DIR/simplify-arm-identity.rs:20:21: 20:32
          goto -> bb4;                     // scope 1 at $DIR/simplify-arm-identity.rs:18:18: 21:6
      }
  
      bb2: {
          unreachable;                     // scope 1 at $DIR/simplify-arm-identity.rs:18:24: 18:25
      }
  
      bb3: {
          _4 = ((_1 as Foo).0: u8);        // scope 1 at $DIR/simplify-arm-identity.rs:19:18: 19:19
          ((_2 as Foo).0: u8) = move _4;   // scope 3 at $DIR/simplify-arm-identity.rs:19:24: 19:35
          discriminant(_2) = 0;            // scope 3 at $DIR/simplify-arm-identity.rs:19:24: 19:35
          goto -> bb4;                     // scope 1 at $DIR/simplify-arm-identity.rs:18:18: 21:6
      }
  
      bb4: {
          StorageDead(_2);                 // scope 1 at $DIR/simplify-arm-identity.rs:21:6: 21:7
          _0 = const ();                   // scope 0 at $DIR/simplify-arm-identity.rs:16:11: 22:2
                                           // ty::Const
                                           // + ty: ()
                                           // + val: Value(Scalar(<ZST>))
                                           // mir::Constant
                                           // + span: $DIR/simplify-arm-identity.rs:16:11: 22:2
                                           // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
          StorageDead(_1);                 // scope 0 at $DIR/simplify-arm-identity.rs:22:1: 22:2
          return;                          // scope 0 at $DIR/simplify-arm-identity.rs:22:2: 22:2
      }
  }