diff options
author | Timothy Arceri <[email protected]> | 2017-01-03 21:10:33 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-01-12 09:47:29 +1100 |
commit | 8f37fc70669024040c954f8a74e9d7b209c867d7 (patch) | |
tree | 19758e079baf758332dd6afb92500d86ce7be659 | |
parent | b4c44ff08c1154ff3790de89f29520d178e9e0ef (diff) |
nir: add imprecise flrp optimisation
On BDW:
total instructions in shared programs: 13061890 -> 13061877 (-0.00%)
instructions in affected programs: 2441 -> 2428 (-0.53%)
helped: 13
HURT: 0
total cycles in shared programs: 256612254 -> 256611784 (-0.00%)
cycles in affected programs: 16418 -> 15948 (-2.86%)
helped: 10
HURT: 2
V2: don't use ffma directly
Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r-- | src/compiler/nir/nir_opt_algebraic.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 85cdc7bdaf9..57e386279cd 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -112,6 +112,7 @@ optimizations = [ (('~flrp', a, a, b), a), (('~flrp', 0.0, a, b), ('fmul', a, b)), (('~flrp', a, b, ('b2f', c)), ('bcsel', c, b, a), 'options->lower_flrp32'), + (('~flrp', a, 0.0, c), ('fadd', ('fmul', ('fneg', a), c), a)), (('flrp@32', a, b, c), ('fadd', ('fmul', c, ('fsub', b, a)), a), 'options->lower_flrp32'), (('flrp@64', a, b, c), ('fadd', ('fmul', c, ('fsub', b, a)), a), 'options->lower_flrp64'), (('ffract', a), ('fsub', a, ('ffloor', a)), 'options->lower_ffract'), |