rust/src/test/mir-opt/bool_compare.opt1.InstCombine.diff

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.7 KiB
Diff
Raw Normal View History

- // 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
switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:3:8: 3:17
}
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
}
}