Skip to content

nir: Some boolean optimizations

Faith Ekstrand requested to merge gfxstrand/mesa:review/nir-bcsel-opt into master

This MR has two commits. The first is obviously correct from a NIR perspective but the actual results once you go through the back-end are more mixed. The second commit is obvious help no matter what.

Shader-db results on Kaby Lake:

total instructions in shared programs: 15321168 -> 15321129 (<.01%)
instructions in affected programs: 12430 -> 12391 (-0.31%)
helped: 7
HURT: 31

total cycles in shared programs: 357481781 -> 357479725 (<.01%)
cycles in affected programs: 190633 -> 188577 (-1.08%)
helped: 28
HURT: 10

total spills in shared programs: 23675 -> 23673 (<.01%)
spills in affected programs: 11 -> 9 (-18.18%)
helped: 1
HURT: 0

total fills in shared programs: 32040 -> 32036 (-0.01%)
fills in affected programs: 27 -> 23 (-14.81%)
helped: 1
HURT: 0

VkPipeline-DB results on Kaby Lake:

total instructions in shared programs: 3770504 -> 3769734 (-0.02%)
instructions in affected programs: 19058 -> 18288 (-4.04%)
helped: 163
HURT: 0

total cycles in shared programs: 1417583701 -> 1417569727 (<.01%)
cycles in affected programs: 750958 -> 736984 (-1.86%)
helped: 158
HURT: 1

Merge request reports

Loading