summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/combine_transmutes.adt_transmutes.InstSimplify.diff
blob: cb623e83f5298bf5b070136ed8ac3cf5022bea2b (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
72
73
74
75
76
77
78
79
80
81
82
83
- // MIR for `adt_transmutes` before InstSimplify
+ // MIR for `adt_transmutes` after InstSimplify
  
  fn adt_transmutes() -> () {
      let mut _0: ();
      let _1: u8;
      let mut _2: std::option::Option<std::num::NonZeroU8>;
      let mut _4: std::num::Wrapping<i16>;
      let mut _6: std::num::Wrapping<i16>;
      let mut _8: Union32;
      let mut _10: Union32;
      let mut _12: std::mem::MaybeUninit<std::string::String>;
      scope 1 {
          debug _a => _1;
          let _3: i16;
          scope 2 {
              debug _a => _3;
              let _5: u16;
              scope 3 {
                  debug _a => _5;
                  let _7: u32;
                  scope 4 {
                      debug _a => _7;
                      let _9: i32;
                      scope 5 {
                          debug _a => _9;
                          let _11: std::mem::ManuallyDrop<std::string::String>;
                          scope 6 {
                              debug _a => _11;
                          }
                      }
                  }
              }
          }
      }
  
      bb0: {
          StorageLive(_1);
          StorageLive(_2);
          _2 = Option::<NonZeroU8>::Some(const _);
          _1 = move _2 as u8 (Transmute);
          StorageDead(_2);
          StorageLive(_3);
          StorageLive(_4);
          _4 = Wrapping::<i16>(const 0_i16);
-         _3 = move _4 as i16 (Transmute);
+         _3 = move (_4.0: i16);
          StorageDead(_4);
          StorageLive(_5);
          StorageLive(_6);
          _6 = Wrapping::<i16>(const 0_i16);
          _5 = move _6 as u16 (Transmute);
          StorageDead(_6);
          StorageLive(_7);
          StorageLive(_8);
          _8 = Union32 { u32: const 0_i32 };
          _7 = move _8 as u32 (Transmute);
          StorageDead(_8);
          StorageLive(_9);
          StorageLive(_10);
          _10 = Union32 { u32: const 0_u32 };
          _9 = move _10 as i32 (Transmute);
          StorageDead(_10);
          StorageLive(_11);
          StorageLive(_12);
          _12 = MaybeUninit::<String>::uninit() -> [return: bb1, unwind unreachable];
      }
  
      bb1: {
-         _11 = move _12 as std::mem::ManuallyDrop<std::string::String> (Transmute);
+         _11 = move (_12.1: std::mem::ManuallyDrop<std::string::String>);
          StorageDead(_12);
          _0 = const ();
          StorageDead(_11);
          StorageDead(_9);
          StorageDead(_7);
          StorageDead(_5);
          StorageDead(_3);
          StorageDead(_1);
          return;
      }
  }