Mesa (master): nir: Recognize another open coded lrp.
Matt Turner
mattst88 at kemper.freedesktop.org
Wed Apr 1 20:53:47 UTC 2015
Module: Mesa
Branch: master
Commit: e26783d4459583790e50e1f59eb2507f618695c6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e26783d4459583790e50e1f59eb2507f618695c6
Author: Matt Turner <mattst88 at gmail.com>
Date: Thu Mar 26 10:36:42 2015 -0700
nir: Recognize another open coded lrp.
total instructions in shared programs: 6195924 -> 6195768 (-0.00%)
instructions in affected programs: 4876 -> 4720 (-3.20%)
helped: 58
HURT: 10
Reviewed-by: Eric Anholt <eric at anholt.net>
---
src/glsl/nir/nir_opt_algebraic.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py
index 368ec7f..5b84a4e 100644
--- a/src/glsl/nir/nir_opt_algebraic.py
+++ b/src/glsl/nir/nir_opt_algebraic.py
@@ -77,6 +77,7 @@ optimizations = [
(('flrp', 0.0, a, b), ('fmul', a, b)),
(('flrp', a, b, c), ('fadd', ('fmul', c, ('fsub', b, a)), a), 'options->lower_flrp'),
(('fadd', ('fmul', a, ('fadd', 1.0, ('fneg', c))), ('fmul', b, c)), ('flrp', a, b, c), '!options->lower_flrp'),
+ (('fadd', a, ('fmul', c, ('fadd', b, ('fneg', a)))), ('flrp', a, b, c), '!options->lower_flrp'),
(('ffma', a, b, c), ('fadd', ('fmul', a, b), c), 'options->lower_ffma'),
(('fadd', ('fmul', a, b), c), ('ffma', a, b, c), '!options->lower_ffma'),
# Comparison simplifications
More information about the mesa-commit
mailing list