|
1 | 1 | - // MIR for `opt` before InstCombine
|
2 | 2 | + // MIR for `opt` after InstCombine
|
3 | 3 |
|
4 |
| - fn opt(_1: Option<()>) -> bool { |
| 4 | + fn opt(_1: bool) -> u32 { |
5 | 5 | debug x => _1; // in scope 0 at $DIR/not_equal_false.rs:3:8: 3:9
|
6 |
| - let mut _0: bool; // return place in scope 0 at $DIR/not_equal_false.rs:3:26: 3:30 |
7 |
| - let mut _2: isize; // in scope 0 at $DIR/not_equal_false.rs:4:17: 4:21 |
8 |
| - let mut _3: isize; // in scope 0 at $DIR/not_equal_false.rs:4:38: 4:45 |
| 6 | + let mut _0: u32; // return place in scope 0 at $DIR/not_equal_false.rs:3:20: 3:23 |
| 7 | + let mut _2: bool; // in scope 0 at $DIR/not_equal_false.rs:4:8: 4:18 |
| 8 | + let mut _3: bool; // in scope 0 at $DIR/not_equal_false.rs:4:8: 4:9 |
9 | 9 |
|
10 | 10 | bb0: {
|
11 |
| - _2 = discriminant(_1); // scope 0 at $DIR/not_equal_false.rs:4:17: 4:21 |
12 |
| - switchInt(move _2) -> [0_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/not_equal_false.rs:4:17: 4:21 |
| 11 | + StorageLive(_2); // scope 0 at $DIR/not_equal_false.rs:4:8: 4:18 |
| 12 | + StorageLive(_3); // scope 0 at $DIR/not_equal_false.rs:4:8: 4:9 |
| 13 | + _3 = _1; // scope 0 at $DIR/not_equal_false.rs:4:8: 4:9 |
| 14 | +- _2 = Ne(move _3, const false); // scope 0 at $DIR/not_equal_false.rs:4:8: 4:18 |
| 15 | ++ _2 = move _3; // scope 0 at $DIR/not_equal_false.rs:4:8: 4:18 |
| 16 | + StorageDead(_3); // scope 0 at $DIR/not_equal_false.rs:4:17: 4:18 |
| 17 | + switchInt(_2) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/not_equal_false.rs:4:5: 4:35 |
13 | 18 | }
|
14 | 19 |
|
15 | 20 | bb1: {
|
16 |
| - _0 = const true; // scope 0 at $DIR/not_equal_false.rs:4:5: 4:46 |
17 |
| - return; // scope 0 at $DIR/not_equal_false.rs:4:5: 4:46 |
| 21 | + _0 = const 1_u32; // scope 0 at $DIR/not_equal_false.rs:4:32: 4:33 |
| 22 | + goto -> bb3; // scope 0 at $DIR/not_equal_false.rs:4:5: 4:35 |
18 | 23 | }
|
19 | 24 |
|
20 | 25 | bb2: {
|
21 |
| - _3 = discriminant(_1); // scope 0 at $DIR/not_equal_false.rs:4:38: 4:45 |
22 |
| - switchInt(move _3) -> [1_isize: bb5, otherwise: bb4]; // scope 0 at $DIR/not_equal_false.rs:4:38: 4:45 |
| 26 | + _0 = const 0_u32; // scope 0 at $DIR/not_equal_false.rs:4:21: 4:22 |
| 27 | + goto -> bb3; // scope 0 at $DIR/not_equal_false.rs:4:5: 4:35 |
23 | 28 | }
|
24 | 29 |
|
25 | 30 | bb3: {
|
26 |
| - goto -> bb1; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL |
27 |
| - } |
28 |
| - |
29 |
| - bb4: { |
30 |
| - _0 = const false; // scope 0 at $DIR/not_equal_false.rs:4:5: 4:46 |
31 |
| - return; // scope 0 at $DIR/not_equal_false.rs:4:5: 4:46 |
32 |
| - } |
33 |
| - |
34 |
| - bb5: { |
35 |
| - goto -> bb1; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL |
| 31 | + StorageDead(_2); // scope 0 at $DIR/not_equal_false.rs:5:1: 5:2 |
| 32 | + return; // scope 0 at $DIR/not_equal_false.rs:5:2: 5:2 |
36 | 33 | }
|
37 | 34 | }
|
38 | 35 |
|
0 commit comments