nir: split out lower_sub from lower_negate
[mesa.git] / src / glsl / nir / nir_opt_algebraic.py
index a8c1745d09b5729c8a2e249e86976914e49e1f64..319732dfca7ae3cf66ac1cdd10650b25c85b1dbe 100644 (file)
@@ -192,8 +192,8 @@ optimizations = [
    # Subtracts
    (('fsub', a, ('fsub', 0.0, b)), ('fadd', a, b)),
    (('isub', a, ('isub', 0, b)), ('iadd', a, b)),
-   (('fsub', a, b), ('fadd', a, ('fneg', b)), '!options->lower_negate'),
-   (('isub', a, b), ('iadd', a, ('ineg', b)), '!options->lower_negate'),
+   (('fsub', a, b), ('fadd', a, ('fneg', b)), 'options->lower_sub'),
+   (('isub', a, b), ('iadd', a, ('ineg', b)), 'options->lower_sub'),
    (('fneg', a), ('fsub', 0.0, a), 'options->lower_negate'),
    (('ineg', a), ('isub', 0, a), 'options->lower_negate'),
    (('fadd', a, ('fsub', 0.0, b)), ('fsub', a, b)),