nir: Rely on the fact that bcsel takes a well formed boolean.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 17 Aug 2016 22:03:01 +0000 (15:03 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 19 Aug 2016 09:05:23 +0000 (02:05 -0700)
commit7d0554f3419f693b7a43a47c1ed3b454dc5dc5f7
tree87626b20d3d80fcb589d5cd8a23bf05c9ffb865a
parent7ceb42ccc5f7943fc839ed19e06b9b7be38dacb0
nir: Rely on the fact that bcsel takes a well formed boolean.

According to Connor, it's safe to assume that the first operand of
bcsel, as well as the operand of b2f and b2i, must be well formed
booleans.

https://lists.freedesktop.org/archives/mesa-dev/2016-August/125658.html

With the previous improvements to a@bool handling, this now has no
change in shader-db instruction counts on Broadwell.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/compiler/nir/nir_opt_algebraic.py