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