diff options
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir_opcodes.py | 6 | ||||
-rw-r--r-- | src/compiler/nir/nir_opt_algebraic.py | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py index 2e5a665fb39..0f6dd0add83 100644 --- a/src/compiler/nir/nir_opcodes.py +++ b/src/compiler/nir/nir_opcodes.py @@ -492,9 +492,9 @@ binop("seq", tfloat32, commutative, "(src0 == src1) ? 1.0f : 0.0f") # Set on Equ binop("sne", tfloat32, commutative, "(src0 != src1) ? 1.0f : 0.0f") # Set on Not Equal -binop("ishl", tint, "", "src0 << src1") -binop("ishr", tint, "", "src0 >> src1") -binop("ushr", tuint, "", "src0 >> src1") +opcode("ishl", 0, tint, [0, 0], [tint, tuint32], "", "src0 << src1") +opcode("ishr", 0, tint, [0, 0], [tint, tuint32], "", "src0 >> src1") +opcode("ushr", 0, tuint, [0, 0], [tuint, tuint32], "", "src0 >> src1") # bitwise logic operators # diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 68938000098..aaad45a4c5a 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -364,19 +364,19 @@ optimizations = [ ('ubfe', 'value', 'offset', 'bits')), 'options->lower_bitfield_extract'), - (('extract_i8', a, b), + (('extract_i8', a, 'b@32'), ('ishr', ('ishl', a, ('imul', ('isub', 3, b), 8)), 24), 'options->lower_extract_byte'), - (('extract_u8', a, b), + (('extract_u8', a, 'b@32'), ('iand', ('ushr', a, ('imul', b, 8)), 0xff), 'options->lower_extract_byte'), - (('extract_i16', a, b), + (('extract_i16', a, 'b@32'), ('ishr', ('ishl', a, ('imul', ('isub', 1, b), 16)), 16), 'options->lower_extract_word'), - (('extract_u16', a, b), + (('extract_u16', a, 'b@32'), ('iand', ('ushr', a, ('imul', b, 16)), 0xffff), 'options->lower_extract_word'), |