[AArch64] Port SIMD narrowing to ISLE (#4478)
* [AArch64] Port SIMD narrowing to ISLE Fvdemote, snarrow, unarrow and uunarrow. Also refactor the aarch64 instructions descriptions to parameterize on ScalarSize instead of using different opcodes. The zero_value pure constructor has been introduced and used by the integer narrow operations and it replaces, and extends, the compare zero patterns. Copright (c) 2022, Arm Limited. * use short 'if' patterns
This commit is contained in:
@@ -643,6 +643,16 @@ impl ScalarSize {
|
||||
_ => panic!("Unexpected scalar FP operand size: {:?}", self),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn widen(&self) -> ScalarSize {
|
||||
match self {
|
||||
ScalarSize::Size8 => ScalarSize::Size16,
|
||||
ScalarSize::Size16 => ScalarSize::Size32,
|
||||
ScalarSize::Size32 => ScalarSize::Size64,
|
||||
ScalarSize::Size64 => ScalarSize::Size128,
|
||||
ScalarSize::Size128 => panic!("can't widen 128-bits"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Type used to communicate the size of a vector operand.
|
||||
|
||||
Reference in New Issue
Block a user