ir3: convert shift amount to 16b for 16b shifts
authorDanylo Piliaiev <dpiliaiev@igalia.com>
Wed, 24 Mar 2021 15:24:30 +0000 (17:24 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 1 Apr 2021 17:51:07 +0000 (17:51 +0000)
commit14460faa6428974340cbb951ef8de9239daed5a4
treeca7f1dfdada8a40adfce9ce8c46cf66a7b3fc784
parent3777ecdf119bf3ae979ac5524d7ccfef68617b7e
ir3: convert shift amount to 16b for 16b shifts

NIR has shifts defined as:
 opcode("*shr", 0, tuint, [0, 0], [tuint, tuint32], False, ...

However, in ir3 we have to ensure that both operators of shift
instruction have the same bitness.

Let's hope that in future the additional COV for constants would
be optimized away.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9840>
src/freedreno/ir3/ir3_compiler_nir.c