diff options
author | Eric Anholt <[email protected]> | 2015-02-18 12:24:38 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-03-27 13:29:48 -0700 |
commit | afa9fc15613c3ebdc59245c9d4d8c1280b2a2a37 (patch) | |
tree | e4373aaa6ec3fe9942e9385dbc8ba9e443cb81f3 /src/glsl/nir/nir_opt_algebraic.py | |
parent | 56076be2ac60f005770516a9ac305e60e6285497 (diff) |
nir: Add optional lowering of flrp.
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_opt_algebraic.py')
-rw-r--r-- | src/glsl/nir/nir_opt_algebraic.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py index 1ee51a05f80..20ec4d3a39a 100644 --- a/src/glsl/nir/nir_opt_algebraic.py +++ b/src/glsl/nir/nir_opt_algebraic.py @@ -75,6 +75,7 @@ optimizations = [ (('flrp', a, b, 1.0), b), (('flrp', a, a, b), a), (('flrp', 0.0, a, b), ('fmul', a, b)), + (('flrp', a, b, c), ('fadd', ('fmul', c, ('fsub', b, a)), a), '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 |