This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bit-shift Integer Rounding-to-even with ARMv8 NEON SIMD on Aarch64

UQRSHRN can be used to do bit shifting with rounding. However it looks like the rounding behavior is always rounding to nearest integer.. but in case of ties rounds away from 0.

Is there a way to control the rounding behavior used in UQRSHRN and consequently vqrshrn_n_u16 to match the different rounding modes?

More specifically, I would like to round to nearest integer but incase of ties at 0.5 round to nearest even.

This would help mimic the behavior our code observes on x86 platforms.