Skip to content

v3d: Add optimization of add(a, -b) to sub(a, b)

Emma Anholt requested to merge anholt/mesa:v3d-opt-sub into master

I kept this in V3D instead of putting it in nir_opt_algebraic under !lower_fsub because I recall deciding not to do it for vc4. Some shaders do get hurt, when the -b was reused for other purposes.

total instructions in shared programs: 6408469 -> 6170332 (-3.72%) total threads in shared programs: 153784 -> 154114 (0.21%) total uniforms in shared programs: 2157078 -> 1905168 (-11.68%) total max-temps in shared programs: 904546 -> 896538 (-0.89%)

Merge request reports