about summary refs log tree commit diff
path: root/tests/mir-opt/dead-store-elimination/provenance_soundness.pointer_to_int.DeadStoreElimination-initial.diff
blob: 5d054e2ea16f4643c9ad2ceb13096c1c96146c64 (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
- // MIR for `pointer_to_int` before DeadStoreElimination-initial
+ // MIR for `pointer_to_int` after DeadStoreElimination-initial
  
  fn pointer_to_int(_1: *mut i32) -> () {
      debug p => _1;
      let mut _0: ();
      let _2: usize;
      let mut _3: *mut i32;
      let mut _5: *mut i32;
      scope 1 {
          debug _x => _2;
          let _4: isize;
          scope 2 {
              debug _y => _4;
          }
      }
  
      bb0: {
          StorageLive(_2);
          StorageLive(_3);
          _3 = copy _1;
          _2 = move _3 as usize (PointerExposeProvenance);
          StorageDead(_3);
          StorageLive(_4);
          StorageLive(_5);
          _5 = copy _1;
          _4 = move _5 as isize (PointerExposeProvenance);
          StorageDead(_5);
          _0 = const ();
          StorageDead(_4);
          StorageDead(_2);
          return;
      }
  }