summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_opt_algebraic.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/nir/nir_opt_algebraic.py')
-rw-r--r--src/glsl/nir/nir_opt_algebraic.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py
index 688ceff8c92..ef855aa774e 100644
--- a/src/glsl/nir/nir_opt_algebraic.py
+++ b/src/glsl/nir/nir_opt_algebraic.py
@@ -58,6 +58,8 @@ optimizations = [
(('iadd', a, 0), a),
(('fadd', ('fmul', a, b), ('fmul', a, c)), ('fmul', a, ('fadd', b, c))),
(('iadd', ('imul', a, b), ('imul', a, c)), ('imul', a, ('iadd', b, c))),
+ (('fadd', ('fneg', a), a), 0.0),
+ (('iadd', ('ineg', a), a), 0),
(('fmul', a, 0.0), 0.0),
(('imul', a, 0), 0),
(('fmul', a, 1.0), a),