summary refs log tree commit diff
path: root/src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyArmIdentity.diff
blob: a4cc6b817eac8ee0808fc511464e7c4b93b2b52c (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
- // MIR for `try_identity` before SimplifyArmIdentity
+ // MIR for `try_identity` after SimplifyArmIdentity
  
  fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i32> {
      debug x => _1;                       // in scope 0 at $DIR/simplify_try.rs:5:17: 5:18
      let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:5:41: 5:57
      let _2: u32;                         // in scope 0 at $DIR/simplify_try.rs:6:9: 6:10
      let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:6:13: 6:15
      let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:6:13: 6:14
      let mut _5: isize;                   // in scope 0 at $DIR/simplify_try.rs:6:14: 6:15
      let _6: i32;                         // in scope 0 at $DIR/simplify_try.rs:6:14: 6:15
      let mut _7: !;                       // in scope 0 at $DIR/simplify_try.rs:6:14: 6:15
      let mut _8: i32;                     // in scope 0 at $DIR/simplify_try.rs:6:14: 6:15
      let mut _9: i32;                     // in scope 0 at $DIR/simplify_try.rs:6:14: 6:15
      let _10: u32;                        // in scope 0 at $DIR/simplify_try.rs:6:13: 6:15
      let mut _11: u32;                    // in scope 0 at $DIR/simplify_try.rs:7:8: 7:9
      scope 1 {
          debug y => _10;                  // in scope 1 at $DIR/simplify_try.rs:6:9: 6:10
      }
      scope 2 {
          debug err => _6;                 // in scope 2 at $DIR/simplify_try.rs:6:14: 6:15
          scope 3 {
              scope 7 {
                  debug t => _6;           // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
              }
              scope 8 {
                  debug v => _6;           // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
                  let mut _12: i32;        // in scope 8 at $DIR/simplify_try.rs:6:14: 6:15
              }
          }
      }
      scope 4 {
          debug val => _10;                // in scope 4 at $DIR/simplify_try.rs:6:13: 6:15
          scope 5 {
          }
      }
      scope 6 {
          debug self => _1;                // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL
      }
  
      bb0: {
          _5 = discriminant(_1);           // bb0[0]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15
          switchInt(move _5) -> [0isize: bb1, otherwise: bb2]; // bb0[1]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15
      }
  
      bb1: {
-         _10 = ((_1 as Ok).0: u32);       // bb1[0]: scope 0 at $DIR/simplify_try.rs:6:13: 6:15
-         ((_0 as Ok).0: u32) = move _10;  // bb1[1]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10
-         discriminant(_0) = 0;            // bb1[2]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10
+         _0 = move _1;                    // bb1[0]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10
+         nop;                             // bb1[1]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10
+         nop;                             // bb1[2]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10
          goto -> bb3;                     // bb1[3]: scope 0 at $DIR/simplify_try.rs:8:2: 8:2
      }
  
      bb2: {
-         _6 = ((_1 as Err).0: i32);       // bb2[0]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15
-         ((_0 as Err).0: i32) = move _6;  // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
-         discriminant(_0) = 1;            // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
+         _0 = move _1;                    // bb2[0]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
+         nop;                             // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
+         nop;                             // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
          goto -> bb3;                     // bb2[3]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15
      }
  
      bb3: {
          return;                          // bb3[0]: scope 0 at $DIR/simplify_try.rs:8:2: 8:2
      }
  }