mesa/src/compiler
Ian Romanick 08ff5f4d1f nir: Simplify a bcsel to logical-or
Oddly, this did not affect the shader where I first noticed the pattern.
That particular shader doesn't get its if-statement converted to a bcsel
because there are two assignments in the else-statement.  This led to me
submitting https://bugs.freedesktop.org/show_bug.cgi?id=94747.

shader-db results:

Sandy Bridge
total instructions in shared programs: 8467384 -> 8467069 (-0.00%)
instructions in affected programs: 36594 -> 36279 (-0.86%)
helped: 46
HURT: 0

total cycles in shared programs: 117573448 -> 117568518 (-0.00%)
cycles in affected programs: 339114 -> 334184 (-1.45%)
helped: 46
HURT: 0

Ivy Bridge / Haswell / Broadwell / Skylake:
total instructions in shared programs: 7774258 -> 7773999 (-0.00%)
instructions in affected programs: 30874 -> 30615 (-0.84%)
helped: 46
HURT: 0

total cycles in shared programs: 65739190 -> 65734530 (-0.01%)
cycles in affected programs: 180380 -> 175720 (-2.58%)
helped: 45
HURT: 1

No change on G45 or Ironlake.

I also tried these expressions, but none of them affected any shaders in
shader-db:

   (('bcsel', a, 'a@bool', 'b@bool'), ('ior', a, b)),
   (('bcsel', a, 'b@bool', False),    ('iand', a, b)),
   (('bcsel', a, 'b@bool', 'a@bool'), ('iand', a, b)),

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-03-31 14:59:36 -07:00
..
glsl mesa: add GL_OES_shader_multisample_interpolation support 2016-03-30 22:57:17 -04:00
nir nir: Simplify a bcsel to logical-or 2016-03-31 14:59:36 -07:00
.gitignore compiler: fix .gitignore for glsl_compiler 2016-02-03 13:32:46 -05:00
Android.gen.mk Android: fix build break from nir/glsl move to compiler/ 2016-02-29 10:51:44 +00:00
Android.mk nir: move to compiler/ 2016-01-26 16:08:30 +00:00
builtin_type_macros.h glsl/types: Add a bare "sampler" type 2016-02-13 17:22:36 -08:00
glsl_types.cpp glsl: add helper for counting varyings 2016-03-31 12:51:06 +11:00
glsl_types.h glsl: add helper for counting varyings 2016-03-31 12:51:06 +11:00
Makefile.am glsl: Ensure glsl/ exists before making the lexer/parser. 2016-02-04 09:31:17 -08:00
Makefile.sources nir/Makefile: Fix alphabetization 2016-03-28 18:32:48 -07:00
nir_types.cpp nir/types: Add more type constructor functions 2016-02-13 17:22:36 -08:00
nir_types.h nir/types: add a function to get the bitsize of a base type 2016-03-17 11:16:33 +01:00
SConscript glsl: move to compiler/ 2016-01-26 16:08:33 +00:00
shader_enums.c nir: move shader_enums.[ch] to compiler 2016-01-26 16:08:20 +00:00
shader_enums.h glsl: keep track of ssbo variable being accessed, add access params 2016-01-29 21:05:08 -05:00