summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_opt_algebraic.py
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-01-04 16:21:34 +1100
committerTimothy Arceri <[email protected]>2017-01-09 12:32:16 +1100
commit1130f82a88ff4e7960e5a8d72db41e1b98431446 (patch)
treec8e74072204d3ec31543e0425327ad083bcd6208 /src/compiler/nir/nir_opt_algebraic.py
parent3371de38f282c77461bbe5007a2fec2a975776df (diff)
nir: add another comparison simplification
On BDW: total instructions in shared programs: 13061877 -> 13060965 (-0.01%) instructions in affected programs: 133569 -> 132657 (-0.68%) helped: 566 HURT: 0 total cycles in shared programs: 256611784 -> 256599536 (-0.00%) cycles in affected programs: 861016 -> 848768 (-1.42%) helped: 379 HURT: 73 Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_algebraic.py')
-rw-r--r--src/compiler/nir/nir_opt_algebraic.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index 434881f85bf..85cdc7bdaf9 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -150,6 +150,8 @@ optimizations = [
# inot(a)
(('fge', 0.0, ('b2f', a)), ('inot', a)),
+ (('fge', ('fneg', ('b2f', a)), 0.0), ('inot', a)),
+
# 0.0 < fabs(a)
# fabs(a) > 0.0
# fabs(a) != 0.0 because fabs(a) must be >= 0