aco/isel: Don't request sign extension when truncating signed integers

This doesn't change semantics but allows us to reject this potentially
ambiguous configuration in convert_int in a later change.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9597>
This commit is contained in:
Tony Wasserka 2021-03-22 17:10:05 +01:00 committed by Marge Bot
parent 3a2b055726
commit 1e03796fa4

View file

@ -2836,8 +2836,10 @@ void visit_alu_instr(isel_context *ctx, nir_alu_instr *instr)
sgpr_extract_sext : sgpr_extract_undef;
extract_8_16_bit_sgpr_element(ctx, dst, &instr->src[0], mode);
} else {
const unsigned input_bitsize = instr->src[0].src.ssa->bit_size;
const unsigned output_bitsize = instr->dest.dest.ssa.bit_size;
convert_int(ctx, bld, get_alu_src(ctx, instr->src[0]),
instr->src[0].src.ssa->bit_size, instr->dest.dest.ssa.bit_size, true, dst);
input_bitsize, output_bitsize, output_bitsize > input_bitsize, dst);
}
break;
}