nir: Optimize out discard_ifs with a constant 0 argument.
authorEric Anholt <eric@anholt.net>
Wed, 16 Mar 2016 01:32:19 +0000 (18:32 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 28 Sep 2016 15:31:14 +0000 (08:31 -0700)
commit1aa8a0392f256a1be8f8d2774a4f7d3e03b3aac3
tree37252635af501f6e59a0764117d4c73a30a34b30
parent8d8c440ebf1a41dd235a67f3f1538cf47adec013
nir: Optimize out discard_ifs with a constant 0 argument.

I found this in a shader that was doing an alpha test when alpha is fixed
at 1.0.

v2: Rebase on master (now the const value is "u32" not "u").

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v1)
src/compiler/nir/nir_opt_constant_folding.c