about summary refs log tree commit diff
path: root/tests/mir-opt/jump_threading.floats.JumpThreading.panic-abort.diff
blob: 1192f7c23e15d2a655b42c246be730f5244e6cf0 (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
- // MIR for `floats` before JumpThreading
+ // MIR for `floats` after JumpThreading
  
  fn floats() -> u32 {
      let mut _0: u32;
      let _1: f64;
      let mut _2: bool;
      let mut _3: bool;
      let mut _4: f64;
      scope 1 {
          debug x => _1;
      }
  
      bb0: {
          StorageLive(_1);
          StorageLive(_2);
          _2 = const true;
-         switchInt(move _2) -> [0: bb2, otherwise: bb1];
+         goto -> bb1;
      }
  
      bb1: {
          _1 = const -0f64;
          goto -> bb3;
      }
  
      bb2: {
          _1 = const 1f64;
          goto -> bb3;
      }
  
      bb3: {
          StorageDead(_2);
          StorageLive(_3);
          StorageLive(_4);
          _4 = copy _1;
          _3 = Eq(move _4, const 0f64);
          switchInt(move _3) -> [0: bb5, otherwise: bb4];
      }
  
      bb4: {
          StorageDead(_4);
          _0 = const 0_u32;
          goto -> bb6;
      }
  
      bb5: {
          StorageDead(_4);
          _0 = const 1_u32;
          goto -> bb6;
      }
  
      bb6: {
          StorageDead(_3);
          StorageDead(_1);
          return;
      }
  }