nir/algebraic: Use unsigned comparison when lowering bitfield insert/extract
authorDaniel Schürmann <daniel.schuermann@campus.tu-berlin.de>
Thu, 2 May 2019 13:28:59 +0000 (15:28 +0200)
committerDaniel Schürmann <daniel@schuermann.dev>
Mon, 24 Jun 2019 16:42:20 +0000 (18:42 +0200)
commit1403c3a7bff43d37cd4bb10e4f31927597af894a
treedd7dea12fbcaed7fd00b48f4c963541701dbb49d
parent4eeb49ea71e47899f5d9a51b8f3e1fd9762fa7ad
nir/algebraic: Use unsigned comparison when lowering bitfield insert/extract

This lets us use the optimization pattern
(('ult', 31, ('iand', b, 31)), False) to remove the
bcsel instruction for code originating in D3D shaders.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/compiler/nir/nir_opt_algebraic.py