rust/tests/mir-opt/dataflow-const-prop/issue_81605.f.DataflowConstProp.diff

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

36 lines
735 B
Diff
Raw Normal View History

2022-08-29 17:57:49 -05:00
- // MIR for `f` before DataflowConstProp
+ // MIR for `f` after DataflowConstProp
fn f() -> usize {
2023-06-06 08:47:00 -05:00
let mut _0: usize;
let mut _1: usize;
let mut _2: bool;
2022-08-29 17:57:49 -05:00
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
StorageLive(_2);
_2 = const true;
- switchInt(move _2) -> [0: bb2, otherwise: bb1];
+ switchInt(const true) -> [0: bb2, otherwise: bb1];
2022-08-29 17:57:49 -05:00
}
bb1: {
2023-06-06 08:47:00 -05:00
_1 = const 1_usize;
goto -> bb3;
2022-08-29 17:57:49 -05:00
}
bb2: {
2023-06-06 08:47:00 -05:00
_1 = const 2_usize;
goto -> bb3;
2022-08-29 17:57:49 -05:00
}
bb3: {
2023-06-06 08:47:00 -05:00
StorageDead(_2);
- _0 = Add(const 1_usize, move _1);
+ _0 = const 2_usize;
StorageDead(_1);
return;
2022-08-29 17:57:49 -05:00
}
}