summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/simplify_locals.r.SimplifyLocals-before-const-prop.diff
blob: c9f7785a4994c883ac3dffc37512ec569ea9505d (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
- // MIR for `r` before SimplifyLocals-before-const-prop
+ // MIR for `r` after SimplifyLocals-before-const-prop
  
  fn r() -> () {
      let mut _0: ();
      let mut _1: i32;
-     let mut _2: &i32;
-     let mut _3: &mut i32;
      scope 1 {
          debug a => _1;
          scope 2 {
              scope 3 {
              }
          }
      }
  
      bb0: {
          StorageLive(_1);
          _1 = const 1_i32;
-         StorageLive(_2);
-         _2 = &_1;
-         StorageDead(_2);
-         StorageLive(_3);
-         _3 = &mut _1;
-         StorageDead(_3);
          _0 = const ();
          StorageDead(_1);
          return;
      }
  }