nir: Avoid an extra NIR op in integer divide lowering.
authorEric Anholt <eric@anholt.net>
Mon, 7 Nov 2016 18:34:01 +0000 (10:34 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 17 Nov 2016 03:45:01 +0000 (19:45 -0800)
commit80786a67cf64f9d3ae21b42ab7690255105a66db
treef5cc72ded13826a7e3b786b6232252db47c436a3
parent7f27ad55974d0bdac4c94a4523a4d42cc75334d5
nir: Avoid an extra NIR op in integer divide lowering.

NIR bools are ~0 for true, so ((unsigned)a >> 31) != 0 -> ((int)a >> 31).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/nir/nir_lower_idiv.c