Use u32 in Type API (#4280)
Move from passing and returning u8 and u16 values to u32 in many of the functions. This removes a number of type conversions and gives a small compilation time speedup, around ~0.7% on my aarch64 machine. Copyright (c) 2022, Arm Limited.
This commit is contained in:
@@ -219,7 +219,8 @@ fn extend_input_to_reg<C: LowerCtx<I = Inst>>(
|
||||
let ext_mode = match (input_size, requested_size) {
|
||||
(a, b) if a == b => return put_input_in_reg(ctx, spec),
|
||||
(1, 8) => return put_input_in_reg(ctx, spec),
|
||||
(a, b) => ExtMode::new(a, b).unwrap_or_else(|| panic!("invalid extension: {} -> {}", a, b)),
|
||||
(a, b) => ExtMode::new(a.try_into().unwrap(), b.try_into().unwrap())
|
||||
.unwrap_or_else(|| panic!("invalid extension: {} -> {}", a, b)),
|
||||
};
|
||||
|
||||
let src = input_to_reg_mem(ctx, spec);
|
||||
|
||||
Reference in New Issue
Block a user