From 55c1ac4b753d48fa2d97172216202264313e76b7 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 27 Feb 2019 20:12:46 -0800 Subject: [PATCH] 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. Reviewed-by: Matt Turner [v1] Reviewed-by: Dylan Baker Acked-by: Jason Ekstrand --- src/compiler/nir/nir_opt_algebraic.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index f96c0182a29..d77f38f0761 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -605,7 +605,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') ] @@ -622,6 +624,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), ('extract_u8', a, i)) for i in range(2, -1, -1)]) + optimizations.extend([((op, ('ishl', 'a@64', 56 - 8 * i), 7), ('extract_u8', a, i)) for i in range(6, -1, -1)]) optimizations.extend([ # Word extraction -- 2.30.2