rust/tests/mir-opt/sroa/structs.enums.ScalarReplacementOfAggregates.diff

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

44 lines
942 B
Diff
Raw Normal View History

2023-03-05 12:06:55 -06:00
- // MIR for `enums` before ScalarReplacementOfAggregates
+ // MIR for `enums` after ScalarReplacementOfAggregates
fn enums(_1: usize) -> usize {
2023-06-06 08:47:00 -05:00
debug a => _1;
let mut _0: usize;
let mut _2: std::option::Option<usize>;
let mut _3: usize;
let mut _4: isize;
2023-03-05 12:06:55 -06:00
scope 1 {
2023-06-06 08:47:00 -05:00
debug a => _5;
let _5: usize;
2023-03-05 12:06:55 -06:00
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_2);
StorageLive(_3);
_3 = _1;
_2 = Option::<usize>::Some(move _3);
StorageDead(_3);
_4 = discriminant(_2);
switchInt(move _4) -> [1: bb1, otherwise: bb2];
2023-03-05 12:06:55 -06:00
}
bb1: {
2023-06-06 08:47:00 -05:00
StorageLive(_5);
_5 = ((_2 as Some).0: usize);
_0 = _5;
StorageDead(_5);
goto -> bb3;
2023-03-05 12:06:55 -06:00
}
bb2: {
2023-06-06 08:47:00 -05:00
_0 = const 0_usize;
goto -> bb3;
2023-03-05 12:06:55 -06:00
}
bb3: {
2023-06-06 08:47:00 -05:00
StorageDead(_2);
return;
2023-03-05 12:06:55 -06:00
}
}