diff options
author | Ian Romanick <[email protected]> | 2019-02-27 20:12:46 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2019-03-28 15:35:52 -0700 |
commit | cbad201c2b34297dda11ffa414de2ef781225259 (patch) | |
tree | 52690a8f3f0be0e25a2f1421cc7bd5d5f10ed7d3 /src/compiler/nir | |
parent | bc17f5a2a3b2340f46de709d4364b845a8f4cb5f (diff) |
nir/algebraic: Add missing 64-bit extract_[iu]8 patterns
No shader-db changes on any Intel platform.
v2: Use a loop to generate patterns. Suggested by Jason.
v3: Fix a copy-and-paste bug in the extract_[ui] of ishl loop that would
replace an extract_i8 with and extract_u8. This broke ~180 tests. This
bug was introduced in v2.
Reviewed-by: Matt Turner <[email protected]> [v1]
Reviewed-by: Dylan Baker <[email protected]> [v2]
Acked-by: Jason Ekstrand <[email protected]> [v2]
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir_opt_algebraic.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 70720efe048..42cf7673071 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -612,7 +612,9 @@ optimizations = [ # Byte extraction (('ushr', 'a@32', 24), ('extract_u8', a, 3), '!options->lower_extract_byte'), + (('ushr', 'a@64', 56), ('extract_u8', a, 7), '!options->lower_extract_byte'), (('ishr', 'a@32', 24), ('extract_i8', a, 3), '!options->lower_extract_byte'), + (('ishr', 'a@64', 56), ('extract_i8', a, 7), '!options->lower_extract_byte'), (('iand', 0xff, a), ('extract_u8', a, 0), '!options->lower_extract_byte') ] @@ -629,6 +631,7 @@ optimizations.extend([(('extract_u8', ('extract_u16', a, 1), 0), ('extract_u8', # patterns like those below. for op in ('extract_u8', 'extract_i8'): optimizations.extend([((op, ('ishl', 'a@32', 24 - 8 * i), 3), (op, a, i)) for i in range(2, -1, -1)]) + optimizations.extend([((op, ('ishl', 'a@64', 56 - 8 * i), 7), (op, a, i)) for i in range(6, -1, -1)]) optimizations.extend([ # Word extraction |