]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/dataflow-const-prop/issue_81605.f.DataflowConstProp.diff
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / mir-opt / dataflow-const-prop / issue_81605.f.DataflowConstProp.diff
1 - // MIR for `f` before DataflowConstProp
2 + // MIR for `f` after DataflowConstProp
3   
4   fn f() -> usize {
5       let mut _0: usize;                   // return place in scope 0 at $DIR/issue_81605.rs:+0:11: +0:16
6       let mut _1: usize;                   // in scope 0 at $DIR/issue_81605.rs:+1:9: +1:33
7       let mut _2: bool;                    // in scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
8   
9       bb0: {
10           StorageLive(_1);                 // scope 0 at $DIR/issue_81605.rs:+1:9: +1:33
11           StorageLive(_2);                 // scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
12           _2 = const true;                 // scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
13 -         switchInt(move _2) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
14 +         switchInt(const true) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
15       }
16   
17       bb1: {
18           _1 = const 1_usize;              // scope 0 at $DIR/issue_81605.rs:+1:19: +1:20
19           goto -> bb3;                     // scope 0 at $DIR/issue_81605.rs:+1:9: +1:33
20       }
21   
22       bb2: {
23           _1 = const 2_usize;              // scope 0 at $DIR/issue_81605.rs:+1:30: +1:31
24           goto -> bb3;                     // scope 0 at $DIR/issue_81605.rs:+1:9: +1:33
25       }
26   
27       bb3: {
28           StorageDead(_2);                 // scope 0 at $DIR/issue_81605.rs:+1:32: +1:33
29 -         _0 = Add(const 1_usize, move _1); // scope 0 at $DIR/issue_81605.rs:+1:5: +1:33
30 +         _0 = const 2_usize;              // scope 0 at $DIR/issue_81605.rs:+1:5: +1:33
31           StorageDead(_1);                 // scope 0 at $DIR/issue_81605.rs:+1:32: +1:33
32           return;                          // scope 0 at $DIR/issue_81605.rs:+2:2: +2:2
33       }
34   }
35