rust/tests/mir-opt/matches_reduce_branches.match_i128_u128.MatchBranchSimplification.diff

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

48 lines
988 B
Diff
Raw Normal View History

2024-02-20 07:47:27 -06:00
- // MIR for `match_i128_u128` before MatchBranchSimplification
+ // MIR for `match_i128_u128` after MatchBranchSimplification
fn match_i128_u128(_1: EnumAi128) -> u128 {
debug i => _1;
let mut _0: u128;
let mut _2: i128;
+ let mut _3: i128;
2024-02-20 07:47:27 -06:00
bb0: {
_2 = discriminant(_1);
- switchInt(move _2) -> [1: bb5, 2: bb4, 3: bb3, 340282366920938463463374607431768211455: bb2, otherwise: bb1];
- }
-
- bb1: {
- unreachable;
- }
-
- bb2: {
- _0 = const core::num::<impl u128>::MAX;
- goto -> bb6;
- }
-
- bb3: {
- _0 = const 3_u128;
- goto -> bb6;
- }
-
- bb4: {
- _0 = const 2_u128;
- goto -> bb6;
- }
-
- bb5: {
- _0 = const 1_u128;
- goto -> bb6;
- }
-
- bb6: {
+ StorageLive(_3);
+ _3 = move _2;
+ _0 = copy _3 as u128 (IntToInt);
+ StorageDead(_3);
2024-02-20 07:47:27 -06:00
return;
}
}