arm: fix some neon2rvv intrinsic function error
1. For vqdmlal_s16/s32: the doubling result maybe overflow,
so need to use vqaddq_s16/32 to saturate it. As the same with
vqdmlsl_s16/32.
2. The vrdmulh family function need to use vqadd saturating
function to avoid the doubling result overflow.
3. The result of vrshl family function need to keep the sign
bit of the origin data. If a > 0 && b < 0, the result of
(a + (1 << (-b - 1))) maybe overflow into a negative value.
And in gcc/clang, >> means the arithmetic shift left, so it
will get the incorrect sign bit whithout unsigned extend value.
Signed-off-by:
Zhijin Zeng <zhijin.zeng@spacemit.com>
Showing
Please register or sign in to comment