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: 62d55f1281 "nir: Wire up int64 lowering functions"
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365>
This commit is contained in:
Jason Ekstrand 2020-03-28 11:22:43 -05:00 committed by Marge Bot
parent 1b3aefad46
commit 14a49f31d3
1 changed files with 8 additions and 0 deletions

View File

@ -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)