• Timothy Arceri's avatar
    nir: evaluate if condition uses inside the if branches · f1638178
    Timothy Arceri authored
    Since we know what side of the branch we ended up on we can just
    replace the use with a constant.
    
    All helped shaders are from Unreal Engine 4 besides one shader from
    Dirt Showdown.
    
    V2: make sure we do evaluation when condition is used in else with
        a single block (we were checking for blocks < the last else
        block rather than <=)
    
    shader-db results SKL:
    
    total instructions in shared programs: 13219725 -> 13219643 (<.01%)
    instructions in affected programs: 28917 -> 28835 (-0.28%)
    helped: 45
    HURT: 0
    
    total cycles in shared programs: 529335971 -> 529334604 (<.01%)
    cycles in affected programs: 216209 -> 214842 (-0.63%)
    helped: 45
    HURT: 4
    
    Cc: Ian Romanick <idr@freedesktop.org>
    
    fix if condition eval for else with a single block
    f1638178
Name
Last commit
Last update
bin Loading commit data...
build-support Loading commit data...
docs Loading commit data...
doxygen Loading commit data...
include Loading commit data...
m4 Loading commit data...
scons Loading commit data...
scripts Loading commit data...
src Loading commit data...
.dir-locals.el Loading commit data...
.editorconfig Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
Android.common.mk Loading commit data...
Android.mk Loading commit data...
CleanSpec.mk Loading commit data...
Makefile.am Loading commit data...
README.rst Loading commit data...
REVIEWERS Loading commit data...
SConstruct Loading commit data...
VERSION Loading commit data...
appveyor.yml Loading commit data...
autogen.sh Loading commit data...
common.py Loading commit data...
configure.ac Loading commit data...
install-gallium-links.mk Loading commit data...
install-lib-links.mk Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...