diff options
author | Ian Romanick <[email protected]> | 2019-05-10 10:20:02 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2019-05-14 11:25:03 -0700 |
commit | a7724b1cbbf8f2517e542043e443433dad1eb791 (patch) | |
tree | 811da2f5c9473c03545392d3ca2fcb52e4894b37 /src/compiler | |
parent | 7b4ff6a1af27af458446640c41c61cdee6c960f8 (diff) |
nir/algebraic: Add missing ffma(-1, a, b) pattern
All Gen7+ platforms had similar results. (Ice Lake shown)
total instructions in shared programs: 17229439 -> 17229377 (<.01%)
instructions in affected programs: 9859 -> 9797 (-0.63%)
helped: 41
HURT: 0
helped stats (abs) min: 1 max: 6 x̄: 1.51 x̃: 1
helped stats (rel) min: 0.08% max: 11.54% x̄: 1.65% x̃: 0.67%
95% mean confidence interval for instructions value: -1.88 -1.14
95% mean confidence interval for instructions %-change: -2.48% -0.81%
Instructions are helped.
total cycles in shared programs: 360944145 -> 360942989 (<.01%)
cycles in affected programs: 178167 -> 177011 (-0.65%)
helped: 36
HURT: 19
helped stats (abs) min: 1 max: 222 x̄: 38.03 x̃: 5
helped stats (rel) min: 0.01% max: 31.01% x̄: 4.01% x̃: 0.45%
HURT stats (abs) min: 1 max: 34 x̄: 11.21 x̃: 6
HURT stats (rel) min: 0.03% max: 2.74% x̄: 0.72% x̃: 0.50%
95% mean confidence interval for cycles value: -36.01 -6.02
95% mean confidence interval for cycles %-change: -4.18% -0.57%
Cycles are helped.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler')
-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 b64bef07412..837ac5fd6bf 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -121,6 +121,7 @@ optimizations = [ (('~ffma', 0.0, a, b), b), (('~ffma', a, b, 0.0), ('fmul', a, b)), (('ffma', 1.0, a, b), ('fadd', a, b)), + (('ffma', -1.0, a, b), ('fadd', ('fneg', a), b)), (('~flrp', a, b, 0.0), a), (('~flrp', a, b, 1.0), b), (('~flrp', a, a, b), a), |