2023-09-20 21:43:33 +00:00
|
|
|
- // MIR for `main` before GVN
|
|
|
|
+ // MIR for `main` after GVN
|
2020-04-04 17:15:01 +00:00
|
|
|
|
|
|
|
fn main() -> () {
|
2023-06-06 13:47:00 +00:00
|
|
|
let mut _0: ();
|
|
|
|
let mut _1: i32;
|
2020-04-04 17:15:01 +00:00
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageLive(_1);
|
|
|
|
_1 = const 1_i32;
|
|
|
|
- switchInt(_1) -> [1: bb2, otherwise: bb1];
|
|
|
|
+ switchInt(const 1_i32) -> [1: bb2, otherwise: bb1];
|
2020-04-04 17:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-23 16:53:09 +00:00
|
|
|
_0 = foo(const -1_i32) -> [return: bb3, unwind continue];
|
2020-04-04 17:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-06-23 16:53:09 +00:00
|
|
|
_0 = foo(const 0_i32) -> [return: bb3, unwind continue];
|
2020-04-04 17:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageDead(_1);
|
|
|
|
return;
|
2020-04-04 17:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|