nir/lower_idiv: Port recent LLVM fixes to emit_udiv
authorTony Wasserka <tony.wasserka@gmx.de>
Tue, 11 Aug 2020 14:25:37 +0000 (16:25 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 13 Aug 2020 10:11:57 +0000 (10:11 +0000)
commit8277334f3978463ec8631e2b98e3d2a37d113496
treee77857fcfec99e03674c1762fa2b3285783f0888
parentd452c04aa19e093afe47d225c2c02ba536ebf0ce
nir/lower_idiv: Port recent LLVM fixes to emit_udiv

This change fixes off-by-one results in corner cases such as
0xffffffff / 0x11111111. For details refer to LLVM bug 46212.

Fixes: 8b98d0954e6 ('nir/lower_idiv: add new llvm-based path')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6281>
src/compiler/nir/nir_lower_idiv.c