about summary refs log tree commit diff
path: root/tests/mir-opt/gvn_on_unsafe_binder.test.GVN.diff
blob: 33814fb34f3d287b5b8f2f3a5906730ffe7b8df5 (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 `test` before GVN
+ // MIR for `test` after GVN
  
  fn test() -> () {
      let mut _0: ();
      let _1: i32;
      let mut _3: &i32;
      scope 1 {
          debug x => _1;
          let _2: unsafe<'a> &'a i32;
          scope 2 {
              debug binder => _2;
          }
      }
  
      bb0: {
          StorageLive(_1);
          _1 = const 1_i32;
          StorageLive(_2);
          StorageLive(_3);
          _3 = &_1;
          _2 = wrap_binder!(move _3; unsafe<'a> &'a i32);
          StorageDead(_3);
          _0 = const ();
          StorageDead(_2);
          StorageDead(_1);
          return;
      }
  }