summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/const_prop_miscompile.foo.ConstProp.diff
blob: e8bd98cf8cba103da7cc0aa8f6f55d92c69f468f (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 ConstProp
+ // MIR for `foo` after ConstProp
  
  fn foo() -> () {
      let mut _0: ();                      // return place in scope 0 at $DIR/const_prop_miscompile.rs:+0:10: +0:10
      let mut _1: (i32,);                  // in scope 0 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
      let mut _2: &mut i32;                // in scope 0 at $DIR/const_prop_miscompile.rs:+2:6: +2:14
      let mut _4: i32;                     // in scope 0 at $DIR/const_prop_miscompile.rs:+3:13: +3:20
      scope 1 {
          debug u => _1;                   // in scope 1 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
          let _3: bool;                    // in scope 1 at $DIR/const_prop_miscompile.rs:+3:9: +3:10
          scope 2 {
              debug y => _3;               // in scope 2 at $DIR/const_prop_miscompile.rs:+3:9: +3:10
          }
      }
  
      bb0: {
          StorageLive(_1);                 // scope 0 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
          Deinit(_1);                      // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
          (_1.0: i32) = const 1_i32;       // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
          StorageLive(_2);                 // scope 1 at $DIR/const_prop_miscompile.rs:+2:6: +2:14
          _2 = &mut (_1.0: i32);           // scope 1 at $DIR/const_prop_miscompile.rs:+2:6: +2:14
          (*_2) = const 5_i32;             // scope 1 at $DIR/const_prop_miscompile.rs:+2:5: +2:18
          StorageDead(_2);                 // scope 1 at $DIR/const_prop_miscompile.rs:+2:18: +2:19
          StorageLive(_3);                 // scope 1 at $DIR/const_prop_miscompile.rs:+3:9: +3:10
          StorageLive(_4);                 // scope 1 at $DIR/const_prop_miscompile.rs:+3:13: +3:20
          _4 = (_1.0: i32);                // scope 1 at $DIR/const_prop_miscompile.rs:+3:15: +3:18
          _3 = Eq(move _4, const 5_i32);   // scope 1 at $DIR/const_prop_miscompile.rs:+3:13: +3:25
          StorageDead(_4);                 // scope 1 at $DIR/const_prop_miscompile.rs:+3:24: +3:25
          nop;                             // scope 0 at $DIR/const_prop_miscompile.rs:+0:10: +4:2
          StorageDead(_3);                 // scope 1 at $DIR/const_prop_miscompile.rs:+4:1: +4:2
          StorageDead(_1);                 // scope 0 at $DIR/const_prop_miscompile.rs:+4:1: +4:2
          return;                          // scope 0 at $DIR/const_prop_miscompile.rs:+4:2: +4:2
      }
  }