nvir/nir: use nir_lower_idiv
authorBen Skeggs <bskeggs@redhat.com>
Sun, 7 Jun 2020 20:23:50 +0000 (06:23 +1000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 10 Jun 2020 22:52:41 +0000 (22:52 +0000)
commit9670c087a7a0c6927f847c2609852dceb2583360
treef1474def391e5d651dae112961b684b19f1edcdc
parent59b44f90aa4db9425ed05d415c61ef63ced66726
nvir/nir: use nir_lower_idiv

NIR provides a common implementation of this so we don't need to use a
hand-written built-in library.

v2:
- use idiv_precise instead

Especially important on SM70 where we don't have an assembler.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5377>
src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp