about summary refs log tree commit diff
path: root/tests/mir-opt/const_prop/indirect_mutation.foo.GVN.diff
blob: 2435f81206bdafe31efe57565354f0a767daf1ac (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
36
- // MIR for `foo` before GVN
+ // MIR for `foo` after GVN
  
  fn foo() -> () {
      let mut _0: ();
      let mut _1: (i32,);
      let mut _2: &mut i32;
      let mut _4: i32;
      scope 1 {
          debug u => _1;
          let _3: bool;
          scope 2 {
              debug y => _3;
          }
      }
  
      bb0: {
          StorageLive(_1);
-         _1 = (const 1_i32,);
+         _1 = const (1_i32,);
          StorageLive(_2);
          _2 = &mut (_1.0: i32);
          (*_2) = const 5_i32;
          StorageDead(_2);
          StorageLive(_3);
          StorageLive(_4);
          _4 = copy (_1.0: i32);
          _3 = Eq(move _4, const 5_i32);
          StorageDead(_4);
          _0 = const ();
          StorageDead(_3);
          StorageDead(_1);
          return;
      }
  }