nir: fix potential left shift of a negative value