nir: Simplify a bcsel to logical-or
[mesa.git] / src / compiler / nir / nir_opt_algebraic.py
index 2fac9adafe63166c446bdbfe7dedee9acb6129ed..e72b4a791cb052fb9e3518ba36d909c2761a28ff 100644 (file)
@@ -126,6 +126,7 @@ optimizations = [
    (('bcsel', ('flt', a, b), b, a), ('fmax', a, b)),
    (('bcsel', ('inot', 'a@bool'), b, c), ('bcsel', a, c, b)),
    (('bcsel', a, ('bcsel', a, b, c), d), ('bcsel', a, b, d)),
+   (('bcsel', a, True, 'b@bool'), ('ior', a, b)),
    (('fmin', a, a), a),
    (('fmax', a, a), a),
    (('imin', a, a), a),