diff options
author | Jason Ekstrand <[email protected]> | 2017-02-14 22:22:36 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-02-16 17:28:03 -0800 |
commit | 70e86a3f2d2285e580f0faef959f429d61b40632 (patch) | |
tree | b9044a07f3d05528e87628d7af3e7567a3dfb92c /src/compiler/nir | |
parent | e10f522cd7dd1c1a9abf79ad62b7be8486a6b9b8 (diff) |
nir/algebraic: Optimize 64bit pack/unpack
This reduces the instruction count in some fp64 and int64 piglit tests
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir_opt_algebraic.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 8a6dd073e9f..d3eaa1f1f2c 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -306,6 +306,12 @@ optimizations = [ (('fabs', ('b2f', a)), ('b2f', a)), (('iabs', ('b2i', a)), ('b2i', a)), + # Packing and then unpacking does nothing + (('unpack_64_2x32_split_x', ('pack_64_2x32_split', a, b)), a), + (('unpack_64_2x32_split_y', ('pack_64_2x32_split', a, b)), b), + (('pack_64_2x32_split', ('unpack_64_2x32_split_x', a), + ('unpack_64_2x32_split_y', a)), a), + # Byte extraction (('ushr', a, 24), ('extract_u8', a, 3), '!options->lower_extract_byte'), (('iand', 0xff, ('ushr', a, 16)), ('extract_u8', a, 2), '!options->lower_extract_byte'), |