nir/lower_idiv: Convert to lower_instructions
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 5 Jan 2021 16:22:19 +0000 (11:22 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 7 Apr 2021 15:48:15 +0000 (15:48 +0000)
commit7b0eb4aa006dc8a3df529a96c31468784f25fb43
tree2f1e297eb793715cec5eba36d6ccfca291452a81
parente4da24bd24f0af8842d21ef633923bd03447d516
nir/lower_idiv: Convert to lower_instructions

Helps deduplicate some code between the two lowering paths. In
particular, it ports the missing 32-bit? check to the precise pass. This
does not change anything immediately: drivers depending on this to lower
16-bit did not work before due to type mismatches and will not work now
since it'll refuse to lower. But that means sub-32-bit idiv can be
lowered more efficiently in an algebraic pass.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8339>
src/compiler/nir/nir_lower_idiv.c