mirror of https://github.com/rust-lang/rust
148 lines
4.0 KiB
Rust
148 lines
4.0 KiB
Rust
// MIR for `shift_signed` after built
|
|
|
|
fn shift_signed(_1: i8, _2: u128, _3: i8, _4: i32, _5: i128) -> ([i8; 3], [u128; 3]) {
|
|
debug small => _1;
|
|
debug big => _2;
|
|
debug a => _3;
|
|
debug b => _4;
|
|
debug c => _5;
|
|
let mut _0: ([i8; 3], [u128; 3]);
|
|
let mut _6: [i8; 3];
|
|
let mut _7: i8;
|
|
let mut _8: i8;
|
|
let mut _9: i8;
|
|
let mut _10: u8;
|
|
let mut _11: bool;
|
|
let mut _12: i8;
|
|
let mut _13: i8;
|
|
let mut _14: i32;
|
|
let mut _15: u32;
|
|
let mut _16: bool;
|
|
let mut _17: i8;
|
|
let mut _18: i8;
|
|
let mut _19: i128;
|
|
let mut _20: u128;
|
|
let mut _21: bool;
|
|
let mut _22: [u128; 3];
|
|
let mut _23: u128;
|
|
let mut _24: u128;
|
|
let mut _25: i8;
|
|
let mut _26: u8;
|
|
let mut _27: bool;
|
|
let mut _28: u128;
|
|
let mut _29: u128;
|
|
let mut _30: i32;
|
|
let mut _31: u32;
|
|
let mut _32: bool;
|
|
let mut _33: u128;
|
|
let mut _34: u128;
|
|
let mut _35: i128;
|
|
let mut _36: u128;
|
|
let mut _37: bool;
|
|
|
|
bb0: {
|
|
StorageLive(_6);
|
|
StorageLive(_7);
|
|
StorageLive(_8);
|
|
_8 = copy _1;
|
|
StorageLive(_9);
|
|
_9 = copy _3;
|
|
_10 = copy _9 as u8 (IntToInt);
|
|
_11 = Lt(move _10, const 8_u8);
|
|
assert(move _11, "attempt to shift right by `{}`, which would overflow", copy _9) -> [success: bb1, unwind: bb7];
|
|
}
|
|
|
|
bb1: {
|
|
_7 = Shr(move _8, move _9);
|
|
StorageDead(_9);
|
|
StorageDead(_8);
|
|
StorageLive(_12);
|
|
StorageLive(_13);
|
|
_13 = copy _1;
|
|
StorageLive(_14);
|
|
_14 = copy _4;
|
|
_15 = copy _14 as u32 (IntToInt);
|
|
_16 = Lt(move _15, const 8_u32);
|
|
assert(move _16, "attempt to shift right by `{}`, which would overflow", copy _14) -> [success: bb2, unwind: bb7];
|
|
}
|
|
|
|
bb2: {
|
|
_12 = Shr(move _13, move _14);
|
|
StorageDead(_14);
|
|
StorageDead(_13);
|
|
StorageLive(_17);
|
|
StorageLive(_18);
|
|
_18 = copy _1;
|
|
StorageLive(_19);
|
|
_19 = copy _5;
|
|
_20 = copy _19 as u128 (IntToInt);
|
|
_21 = Lt(move _20, const 8_u128);
|
|
assert(move _21, "attempt to shift right by `{}`, which would overflow", copy _19) -> [success: bb3, unwind: bb7];
|
|
}
|
|
|
|
bb3: {
|
|
_17 = Shr(move _18, move _19);
|
|
StorageDead(_19);
|
|
StorageDead(_18);
|
|
_6 = [move _7, move _12, move _17];
|
|
StorageDead(_17);
|
|
StorageDead(_12);
|
|
StorageDead(_7);
|
|
StorageLive(_22);
|
|
StorageLive(_23);
|
|
StorageLive(_24);
|
|
_24 = copy _2;
|
|
StorageLive(_25);
|
|
_25 = copy _3;
|
|
_26 = copy _25 as u8 (IntToInt);
|
|
_27 = Lt(move _26, const 128_u8);
|
|
assert(move _27, "attempt to shift left by `{}`, which would overflow", copy _25) -> [success: bb4, unwind: bb7];
|
|
}
|
|
|
|
bb4: {
|
|
_23 = Shl(move _24, move _25);
|
|
StorageDead(_25);
|
|
StorageDead(_24);
|
|
StorageLive(_28);
|
|
StorageLive(_29);
|
|
_29 = copy _2;
|
|
StorageLive(_30);
|
|
_30 = copy _4;
|
|
_31 = copy _30 as u32 (IntToInt);
|
|
_32 = Lt(move _31, const 128_u32);
|
|
assert(move _32, "attempt to shift left by `{}`, which would overflow", copy _30) -> [success: bb5, unwind: bb7];
|
|
}
|
|
|
|
bb5: {
|
|
_28 = Shl(move _29, move _30);
|
|
StorageDead(_30);
|
|
StorageDead(_29);
|
|
StorageLive(_33);
|
|
StorageLive(_34);
|
|
_34 = copy _2;
|
|
StorageLive(_35);
|
|
_35 = copy _5;
|
|
_36 = copy _35 as u128 (IntToInt);
|
|
_37 = Lt(move _36, const 128_u128);
|
|
assert(move _37, "attempt to shift left by `{}`, which would overflow", copy _35) -> [success: bb6, unwind: bb7];
|
|
}
|
|
|
|
bb6: {
|
|
_33 = Shl(move _34, move _35);
|
|
StorageDead(_35);
|
|
StorageDead(_34);
|
|
_22 = [move _23, move _28, move _33];
|
|
StorageDead(_33);
|
|
StorageDead(_28);
|
|
StorageDead(_23);
|
|
_0 = (move _6, move _22);
|
|
StorageDead(_22);
|
|
StorageDead(_6);
|
|
return;
|
|
}
|
|
|
|
bb7 (cleanup): {
|
|
resume;
|
|
}
|
|
}
|