summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff
blob: e2b45c882d6f3aab0f7458dcf1e31fb148e3033e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
- // MIR for `assert_zero` before InstSimplify
+ // MIR for `assert_zero` after InstSimplify
  
  fn assert_zero(_1: u8) -> u8 {
      let mut _0: u8;
  
      bb0: {
-         switchInt(_1) -> [0: bb2, 1: bb1, otherwise: bb1];
+         switchInt(_1) -> [0: bb2, otherwise: bb1];
      }
  
      bb1: {
          unreachable;
      }
  
      bb2: {
          _0 = _1;
          return;
      }
  }