mesa/src/compiler
Ian Romanick 89f639c0ca nir/algebraic: Remove spurious conversions from inside logic ops
Not only does this eliminate a bunch of unnecessary type converting
MOVs, but it can also enable some SWAR.  The
dEQP-VK.spirv_assembly.type.vec3.i8.bitwise_xor_frag test does
something about like:

    c = a.x ^ b.x;
    d = a.y ^ b.y;
    e = a.z ^ b.z;

After this change, it looks more like:

    uint t = i8vec3AsUint(a) ^ i8vec3AsUint(b);
    c = extract_u8(t, 0);
    d = extract_u8(t, 1);
    e = extract_u8(t, 2);

On Ice Lake, this results in:

SIMD8 shader: 41 instructions. 1 loops. 3804 cycles. 0:0 spills:fills, 5 sends
SIMD8 shader: 31 instructions. 1 loops. 2844 cycles. 0:0 spills:fills, 5 sends

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9025>
2021-08-18 22:03:37 +00:00
..
glsl glsl/opt_algebraic: disable invalid optimization 2021-08-17 08:17:52 +00:00
nir nir/algebraic: Remove spurious conversions from inside logic ops 2021-08-18 22:03:37 +00:00
spirv spirv: create ffma more often 2021-08-16 17:19:45 +00:00
builtin_type_macros.h compiler/types: Add 64-bit image types 2020-11-09 17:17:39 +00:00
glsl_types.cpp glsl: add missing support for explicit components in interface blocks 2021-05-13 08:07:53 +00:00
glsl_types.h glsl: add missing support for explicit components in interface blocks 2021-05-13 08:07:53 +00:00
meson.build spirv: add some tests for volatile/available/visible 2020-09-01 17:15:22 +00:00
nir_types.cpp nir: Add a size_align helper function for aligning elements to 16 bytes. 2020-11-16 13:54:22 -08:00
nir_types.h nir: Add a size_align helper function for aligning elements to 16 bytes. 2020-11-16 13:54:22 -08:00
shader_enums.c tu, freedreno/a6xx, ir3: Rewrite tess PrimID handling 2021-08-05 16:35:41 +00:00
shader_enums.h tu, freedreno/a6xx, ir3: Rewrite tess PrimID handling 2021-08-05 16:35:41 +00:00
shader_info.h mesa: move gl_program::is_arb_asm to shader_info 2021-07-28 08:49:30 +00:00