rust/src/test/mir-opt/const_prop/discriminant.main.ConstProp.32bit.diff

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

51 lines
2.7 KiB
Diff
Raw Normal View History

2020-04-04 12:15:01 -05:00
- // MIR for `main` before ConstProp
+ // MIR for `main` after ConstProp
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/discriminant.rs:10:11: 10:11
let _1: i32; // in scope 0 at $DIR/discriminant.rs:11:9: 11:10
let mut _2: i32; // in scope 0 at $DIR/discriminant.rs:11:13: 11:64
let mut _3: std::option::Option<bool>; // in scope 0 at $DIR/discriminant.rs:11:34: 11:44
let mut _4: isize; // in scope 0 at $DIR/discriminant.rs:11:21: 11:31
2020-04-04 12:15:01 -05:00
scope 1 {
debug x => _1; // in scope 1 at $DIR/discriminant.rs:11:9: 11:10
2020-04-04 12:15:01 -05:00
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/discriminant.rs:11:9: 11:10
StorageLive(_2); // scope 0 at $DIR/discriminant.rs:11:13: 11:64
StorageLive(_3); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
Deinit(_3); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
((_3 as Some).0: bool) = const true; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
discriminant(_3) = 1; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
- _4 = discriminant(_3); // scope 0 at $DIR/discriminant.rs:11:21: 11:31
2021-09-02 04:18:08 -05:00
- switchInt(move _4) -> [1_isize: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
+ _4 = const 1_isize; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
2021-09-02 04:18:08 -05:00
+ switchInt(const 1_isize) -> [1_isize: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
2020-04-04 12:15:01 -05:00
}
bb1: {
2021-09-02 04:18:08 -05:00
switchInt(((_3 as Some).0: bool)) -> [false: bb3, otherwise: bb2]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
2020-04-04 12:15:01 -05:00
}
bb2: {
2021-09-02 04:18:08 -05:00
_2 = const 42_i32; // scope 0 at $DIR/discriminant.rs:11:47: 11:49
goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64
2020-04-04 12:15:01 -05:00
}
bb3: {
2021-09-02 04:18:08 -05:00
_2 = const 10_i32; // scope 0 at $DIR/discriminant.rs:11:59: 11:61
goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64
2020-04-04 12:15:01 -05:00
}
bb4: {
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/discriminant.rs:11:13: 11:68
StorageDead(_2); // scope 0 at $DIR/discriminant.rs:11:67: 11:68
StorageDead(_3); // scope 0 at $DIR/discriminant.rs:11:68: 11:69
2021-03-15 20:58:54 -05:00
nop; // scope 0 at $DIR/discriminant.rs:10:11: 12:2
StorageDead(_1); // scope 0 at $DIR/discriminant.rs:12:1: 12:2
return; // scope 0 at $DIR/discriminant.rs:12:2: 12:2
2020-04-04 12:15:01 -05:00
}
}