diff options
author | Jason Ekstrand <[email protected]> | 2020-03-28 11:22:43 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-31 00:18:05 +0000 |
commit | 14a49f31d3977c2b072b9ef2fdeebebca69fe1d7 (patch) | |
tree | 48ec496277b5430b78c210983173a0ffeb27804d /src/compiler | |
parent | 1b3aefad46bda59ff02c0d81c53fd3fbf249d8f4 (diff) |
nir/lower_int64: Lower 8 and 16-bit downcasts with nir_lower_mov64
We have the code to do the lowering, we were just missing the
boilerplate bits to make should_lower_int64_alu_instr return true.
Fixes: 62d55f12818e "nir: Wire up int64 lowering functions"
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_lower_int64.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_int64.c b/src/compiler/nir/nir_lower_int64.c index 6e3f8526f7b..e18a5481225 100644 --- a/src/compiler/nir/nir_lower_int64.c +++ b/src/compiler/nir/nir_lower_int64.c @@ -692,8 +692,12 @@ nir_lower_int64_op_to_options_mask(nir_op opcode) return nir_lower_divmod64; case nir_op_b2i64: case nir_op_i2b1: + case nir_op_i2i8: + case nir_op_i2i16: case nir_op_i2i32: case nir_op_i2i64: + case nir_op_u2u8: + case nir_op_u2u16: case nir_op_u2u32: case nir_op_u2u64: case nir_op_bcsel: @@ -855,7 +859,11 @@ should_lower_int64_alu_instr(const nir_instr *instr, const void *_options) switch (alu->op) { case nir_op_i2b1: + case nir_op_i2i8: + case nir_op_i2i16: case nir_op_i2i32: + case nir_op_u2u8: + case nir_op_u2u16: case nir_op_u2u32: assert(alu->src[0].src.is_ssa); if (alu->src[0].src.ssa->bit_size != 64) |