summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/dataflow-const-prop/issue_81605.f.DataflowConstProp.diff
blob: 881d80f7c032606fa969eddf7adc8d4db00b2e89 (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 `f` before DataflowConstProp
+ // MIR for `f` after DataflowConstProp
  
  fn f() -> usize {
      let mut _0: usize;                   // return place in scope 0 at $DIR/issue_81605.rs:+0:11: +0:16
      let mut _1: usize;                   // in scope 0 at $DIR/issue_81605.rs:+1:9: +1:33
      let mut _2: bool;                    // in scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
  
      bb0: {
          StorageLive(_1);                 // scope 0 at $DIR/issue_81605.rs:+1:9: +1:33
          StorageLive(_2);                 // scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
          _2 = const true;                 // scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
-         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
+         switchInt(const true) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
      }
  
      bb1: {
          _1 = const 1_usize;              // scope 0 at $DIR/issue_81605.rs:+1:19: +1:20
          goto -> bb3;                     // scope 0 at $DIR/issue_81605.rs:+1:9: +1:33
      }
  
      bb2: {
          _1 = const 2_usize;              // scope 0 at $DIR/issue_81605.rs:+1:30: +1:31
          goto -> bb3;                     // scope 0 at $DIR/issue_81605.rs:+1:9: +1:33
      }
  
      bb3: {
          StorageDead(_2);                 // scope 0 at $DIR/issue_81605.rs:+1:32: +1:33
-         _0 = Add(const 1_usize, move _1); // scope 0 at $DIR/issue_81605.rs:+1:5: +1:33
+         _0 = const 2_usize;              // scope 0 at $DIR/issue_81605.rs:+1:5: +1:33
          StorageDead(_1);                 // scope 0 at $DIR/issue_81605.rs:+1:32: +1:33
          return;                          // scope 0 at $DIR/issue_81605.rs:+2:2: +2:2
      }
  }