about summary refs log tree commit diff
path: root/tests/mir-opt/simplify_dead_blocks.assert_nonzero_nonmax.SimplifyCfg-after-unreachable-enum-branching.diff
blob: 9c8efab5c843742d7bbf30300c0debfd26cb4a13 (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
- // MIR for `assert_nonzero_nonmax` before SimplifyCfg-after-unreachable-enum-branching
+ // MIR for `assert_nonzero_nonmax` after SimplifyCfg-after-unreachable-enum-branching
  
  fn assert_nonzero_nonmax(_1: u8) -> u8 {
      let mut _0: u8;
  
      bb0: {
-         switchInt(copy _1) -> [0: bb3, 1: bb2, 255: bb3, otherwise: bb4];
+         switchInt(copy _1) -> [0: bb2, 1: bb1, 255: bb2, otherwise: bb3];
      }
  
      bb1: {
-         _0 = const 1_u8;
-         return;
-     }
- 
-     bb2: {
          _0 = const 2_u8;
          return;
      }
  
-     bb3: {
+     bb2: {
          unreachable;
      }
  
-     bb4: {
+     bb3: {
          _0 = copy _1;
          return;
      }
  }