about summary refs log tree commit diff
path: root/tests/mir-opt/dead-store-elimination/ref.dead_first.DeadStoreElimination-initial.diff
blob: 2a793e24990ae9a3f0ccbafea7dea0b716b47722 (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
- // MIR for `dead_first` before DeadStoreElimination-initial
+ // MIR for `dead_first` after DeadStoreElimination-initial
  
  fn dead_first(_1: &Foo) -> &i32 {
      debug v => _1;
      let mut _0: &i32;
      let mut _2: &i32;
      let mut _3: &i32;
      let _4: &i32;
      scope 1 {
          debug a => _2;
      }
  
      bb0: {
          StorageLive(_2);
-         _2 = &((*_1).2: i32);
+         // DBG: _2 = &((*_1).2: i32);
          StorageLive(_3);
          StorageLive(_4);
          _4 = &((*_1).0: i32);
          _3 = &(*_4);
          _2 = move _3;
          StorageDead(_3);
          StorageDead(_4);
          _0 = &(*_2);
          StorageDead(_2);
          return;
      }
  }