• Zhijin Zeng's avatar
    arm: fix some neon2rvv intrinsic function error · 737e3b33
    Zhijin Zeng authored
    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: default avatarZhijin Zeng <zhijin.zeng@spacemit.com>
    737e3b33
qrdmulh.h 6.39 KB