File: gvn_ptr_eq_with_constant.main.GVN.diff

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, 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 (52 lines) | stat: -rw-r--r-- 1,439 bytes parent folder | download | duplicates (3)
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
- // MIR for `main` before GVN
+ // MIR for `main` after GVN
  
  fn main() -> () {
      let mut _0: ();
      let _1: bool;
      let mut _2: *mut u8;
      scope 1 (inlined dangling_mut::<u8>) {
          let mut _3: usize;
          scope 2 (inlined align_of::<u8>) {
          }
          scope 3 (inlined without_provenance_mut::<u8>) {
          }
      }
      scope 4 (inlined Foo::<u8>::cmp_ptr) {
          let mut _4: *const u8;
          let mut _5: *mut u8;
          let mut _6: *const u8;
          scope 5 (inlined std::ptr::eq::<u8>) {
          }
      }
  
      bb0: {
          StorageLive(_1);
          StorageLive(_2);
          StorageLive(_3);
-         _3 = AlignOf(u8);
-         _2 = copy _3 as *mut u8 (Transmute);
+         _3 = const 1_usize;
+         _2 = const {0x1 as *mut u8};
          StorageDead(_3);
          StorageLive(_4);
          StorageLive(_5);
-         _5 = copy _2;
-         _4 = copy _2 as *const u8 (PtrToPtr);
+         _5 = const {0x1 as *mut u8};
+         _4 = const {0x1 as *const u8};
          StorageDead(_5);
          StorageLive(_6);
-         _6 = const Foo::<u8>::SENTINEL as *const u8 (PtrToPtr);
-         _1 = Eq(copy _4, copy _6);
+         _6 = const {0x1 as *const u8};
+         _1 = const true;
          StorageDead(_6);
          StorageDead(_4);
          StorageDead(_2);
          StorageDead(_1);
          _0 = const ();
          return;
      }
  }