We should never see COMBINE constants explicitly since they'll become
moves anyway, so we can simplify that. On the other hand, we do need the
type information for the lowering to work properly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
.src = {
BIR_INDEX_CONSTANT
},
+ .src_types = {
+ instr->def.bit_size | nir_type_uint,
+ },
.constant = {
.u64 = nir_const_value_as_uint(instr->value[0], instr->def.bit_size)
}
unsigned constants_left = (64 / dest_bits);
unsigned constant_shift = 0;
+ if (alu.type == BI_COMBINE)
+ constants_left = 0;
+
/* Copy sources */
unsigned num_inputs = nir_op_infos[instr->op].num_inputs;