File: gvn.cast_pointer_then_transmute.GVN.panic-unwind.diff

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (47 lines) | stat: -rw-r--r-- 1,308 bytes parent folder | download | duplicates (6)
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
- // MIR for `cast_pointer_then_transmute` before GVN
+ // MIR for `cast_pointer_then_transmute` after GVN
  
  fn cast_pointer_then_transmute(_1: *mut u32, _2: *mut [u8]) -> () {
      debug thin => _1;
      debug fat => _2;
      let mut _0: ();
      let _3: usize;
      let mut _4: *const ();
      let mut _5: *mut u32;
      let mut _7: *const ();
      let mut _8: *mut [u8];
      scope 1 {
          debug thin_addr => _3;
          let _6: usize;
          scope 2 {
              debug fat_addr => _6;
          }
      }
  
      bb0: {
          StorageLive(_3);
          StorageLive(_4);
          StorageLive(_5);
          _5 = copy _1;
-         _4 = move _5 as *const () (PtrToPtr);
+         _4 = copy _1 as *const () (PtrToPtr);
          StorageDead(_5);
-         _3 = move _4 as usize (Transmute);
+         _3 = copy _1 as usize (Transmute);
          StorageDead(_4);
          StorageLive(_6);
          StorageLive(_7);
          StorageLive(_8);
          _8 = copy _2;
-         _7 = move _8 as *const () (PtrToPtr);
+         _7 = copy _2 as *const () (PtrToPtr);
          StorageDead(_8);
          _6 = move _7 as usize (Transmute);
          StorageDead(_7);
          _0 = const ();
          StorageDead(_6);
          StorageDead(_3);
          return;
      }
  }