2021-06-07 16:33:00 +00:00
|
|
|
- // MIR for `opt1` before InstCombine
|
|
|
|
+ // MIR for `opt1` after InstCombine
|
|
|
|
|
|
|
|
fn opt1(_1: bool) -> u32 {
|
|
|
|
debug x => _1; // in scope 0 at $DIR/bool_compare.rs:2:9: 2:10
|
|
|
|
let mut _0: u32; // return place in scope 0 at $DIR/bool_compare.rs:2:21: 2:24
|
|
|
|
let mut _2: bool; // in scope 0 at $DIR/bool_compare.rs:3:8: 3:17
|
|
|
|
let mut _3: bool; // in scope 0 at $DIR/bool_compare.rs:3:8: 3:9
|
|
|
|
|
|
|
|
bb0: {
|
|
|
|
StorageLive(_2); // scope 0 at $DIR/bool_compare.rs:3:8: 3:17
|
|
|
|
StorageLive(_3); // scope 0 at $DIR/bool_compare.rs:3:8: 3:9
|
|
|
|
_3 = _1; // scope 0 at $DIR/bool_compare.rs:3:8: 3:9
|
|
|
|
- _2 = Ne(move _3, const true); // scope 0 at $DIR/bool_compare.rs:3:8: 3:17
|
|
|
|
+ _2 = Not(move _3); // scope 0 at $DIR/bool_compare.rs:3:8: 3:17
|
|
|
|
StorageDead(_3); // scope 0 at $DIR/bool_compare.rs:3:16: 3:17
|
2021-09-01 21:52:17 +00:00
|
|
|
switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:3:8: 3:17
|
2021-06-07 16:33:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
|
|
|
_0 = const 0_u32; // scope 0 at $DIR/bool_compare.rs:3:20: 3:21
|
|
|
|
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:3:5: 3:34
|
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
|
|
|
_0 = const 1_u32; // scope 0 at $DIR/bool_compare.rs:3:31: 3:32
|
|
|
|
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:3:5: 3:34
|
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
|
|
|
StorageDead(_2); // scope 0 at $DIR/bool_compare.rs:3:33: 3:34
|
|
|
|
return; // scope 0 at $DIR/bool_compare.rs:4:2: 4:2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|