fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.5 KiB83 linesraw
1- // MIR for `adt_transmutes` before InstSimplify
2+ // MIR for `adt_transmutes` after InstSimplify
3  
4  fn adt_transmutes() -> () {
5      let mut _0: ();
6      let _1: u8;
7      let mut _2: std::option::Option<std::num::NonZeroU8>;
8      let mut _4: std::num::Wrapping<i16>;
9      let mut _6: std::num::Wrapping<i16>;
10      let mut _8: Union32;
11      let mut _10: Union32;
12      let mut _12: std::mem::MaybeUninit<std::string::String>;
13      scope 1 {
14          debug _a => _1;
15          let _3: i16;
16          scope 2 {
17              debug _a => _3;
18              let _5: u16;
19              scope 3 {
20                  debug _a => _5;
21                  let _7: u32;
22                  scope 4 {
23                      debug _a => _7;
24                      let _9: i32;
25                      scope 5 {
26                          debug _a => _9;
27                          let _11: std::mem::ManuallyDrop<std::string::String>;
28                          scope 6 {
29                              debug _a => _11;
30                          }
31                      }
32                  }
33              }
34          }
35      }
36  
37      bb0: {
38          StorageLive(_1);
39          StorageLive(_2);
40          _2 = Option::<NonZeroU8>::Some(const _);
41          _1 = move _2 as u8 (Transmute);
42          StorageDead(_2);
43          StorageLive(_3);
44          StorageLive(_4);
45          _4 = Wrapping::<i16>(const 0_i16);
46-         _3 = move _4 as i16 (Transmute);
47+         _3 = move (_4.0: i16);
48          StorageDead(_4);
49          StorageLive(_5);
50          StorageLive(_6);
51          _6 = Wrapping::<i16>(const 0_i16);
52          _5 = move _6 as u16 (Transmute);
53          StorageDead(_6);
54          StorageLive(_7);
55          StorageLive(_8);
56          _8 = Union32 { u32: const 0_i32 };
57          _7 = move _8 as u32 (Transmute);
58          StorageDead(_8);
59          StorageLive(_9);
60          StorageLive(_10);
61          _10 = Union32 { u32: const 0_u32 };
62          _9 = move _10 as i32 (Transmute);
63          StorageDead(_10);
64          StorageLive(_11);
65          StorageLive(_12);
66          _12 = MaybeUninit::<String>::uninit() -> [return: bb1, unwind unreachable];
67      }
68  
69      bb1: {
70-         _11 = move _12 as std::mem::ManuallyDrop<std::string::String> (Transmute);
71+         _11 = move (_12.1: std::mem::ManuallyDrop<std::string::String>);
72          StorageDead(_12);
73          _0 = const ();
74          StorageDead(_11);
75          StorageDead(_9);
76          StorageDead(_7);
77          StorageDead(_5);
78          StorageDead(_3);
79          StorageDead(_1);
80          return;
81      }
82  }
83