summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_opt_algebraic.py
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-12-05 21:26:46 -0600
committerJason Ekstrand <[email protected]>2018-12-16 21:03:02 +0000
commit517099809aec6f30633f315cff454d859d8c7431 (patch)
tree50da5f793f9579d7de0e5e7346677b3d435348df /src/compiler/nir/nir_opt_algebraic.py
parent4bb1a34727f52ecd4a8f00725d740ae2047cb1dc (diff)
nir: Drop support for lower_b2f
This was originally added for the out-of-tree Mali driver but I think we've all agreed it's easy enough for them to just do in their back-end. Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_algebraic.py')
-rw-r--r--src/compiler/nir/nir_opt_algebraic.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index ea24094a927..57abe7c9952 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -440,7 +440,7 @@ optimizations = [
(('imul', ('b2i', 'a@32'), ('b2i', 'b@32')), ('b2i', ('iand', a, b))),
(('fmul', ('b2f', 'a@32'), ('b2f', 'b@32')), ('b2f', ('iand', a, b))),
(('fsat', ('fadd', ('b2f', 'a@32'), ('b2f', 'b@32'))), ('b2f', ('ior', a, b))),
- (('iand', 'a@bool', 1.0), ('b2f', a), '!options->lower_b2f'),
+ (('iand', 'a@bool', 1.0), ('b2f', a)),
# True/False are ~0 and 0 in NIR. b2i of True is 1, and -1 is ~0 (True).
(('ineg', ('b2i32', 'a@32')), a),
(('flt', ('fneg', ('b2f', 'a@32')), 0), a), # Generated by TGSI KILL_IF.
@@ -916,9 +916,6 @@ late_optimizations = [
# we do these late so that we don't get in the way of creating ffmas
(('fmin', ('fadd(is_used_once)', '#c', a), ('fadd(is_used_once)', '#c', b)), ('fadd', c, ('fmin', a, b))),
(('fmax', ('fadd(is_used_once)', '#c', a), ('fadd(is_used_once)', '#c', b)), ('fadd', c, ('fmax', a, b))),
-
- # Lowered for backends without a dedicated b2f instruction
- (('b2f32', 'a@32'), ('iand', a, 1.0), 'options->lower_b2f'),
]
print(nir_algebraic.AlgebraicPass("nir_opt_algebraic", optimizations).render())